Im trying to build some search capability that will be used in an mobile
app. Being new to ES I'm having problems getting the correct search
results.
I'm storing text like:
"I am an iPhone developer. I am looking for work for the next year. I am
willing to travel"
"Experienced Oracle DBA, willing to travel for work. I have about 5 years
experience in DBA.."
"I am the super duper developer with massive amounts of experience. Call me
for all work."
When I do a search like "Iphone developer" I get all three matches back
even though the second has Oracle and nothing to do with Iphone.
The default operator for a query_string query is OR:
Still not sure why the second document is being matched on, but try
simpler analyzers first before optimizing with ngrams. Besides, with
ngrams, it is often best to not apply an ngram analyzer on the search
string against a field that has been analyzed since you might get
false positives between query strings with the same prefix.
Im trying to build some search capability that will be used in an mobile
app. Being new to ES I'm having problems getting the correct search
results.
I'm storing text like:
"I am an iPhone developer. I am looking for work for the next year. I am
willing to travel"
"Experienced Oracle DBA, willing to travel for work. I have about 5 years
experience in DBA.."
"I am the super duper developer with massive amounts of experience. Call me
for all work."
When I do a search like "Iphone developer" I get all three matches back even
though the second has Oracle and nothing to do with Iphone.
Is there anyway to "loosen" ,if you will, the default_operator of "and".
My match works but if I change my query to
"looking for iphone developer" I only get one hit when I should get 2 based
on the following 2 stored sentences:
"iPhone developer available for hire."
"I am an iPhone developer. I am looking for work for the next year. I am
willing to travel."
I have not simplified the analyzer. Would that help this issue?
On Friday, July 20, 2012 6:27:51 PM UTC-5, Ivan Brusic wrote:
The default operator for a query_string query is OR:
Still not sure why the second document is being matched on, but try
simpler analyzers first before optimizing with ngrams. Besides, with
ngrams, it is often best to not apply an ngram analyzer on the search
string against a field that has been analyzed since you might get
false positives between query strings with the same prefix.
Im trying to build some search capability that will be used in an mobile
app. Being new to ES I'm having problems getting the correct search
results.
I'm storing text like:
"I am an iPhone developer. I am looking for work for the next year. I am
willing to travel"
"Experienced Oracle DBA, willing to travel for work. I have about 5
years
experience in DBA.."
"I am the super duper developer with massive amounts of experience. Call
me
for all work."
When I do a search like "Iphone developer" I get all three matches back
even
though the second has Oracle and nothing to do with Iphone.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.