Hi, i need a fuzzy or "like" search for the elasticsearch php client.
I have a field called name, and there are values like testone, testtwo,
testthree.
Now i need a search for a searchstring like test. There should come all
values.
You can query for term prefixes and complex patterns:
But use it with care as it is rather slow. To speed it up you might want
to use n-grams at index time:
Best regards,
Hannes
On 11.01.2015 16:42, Stefan Kruse wrote:
Hi, i need a fuzzy or "like" search for the elasticsearch php client.
I have a field called name, and there are values like testone, testtwo,
testthree.
Now i need a search for a searchstring like test. There should come all
values.
Hi Hannes,
thanks for replay. But i dont get it to work.
I made some chages. In my database i have the value"Scherzartikel für
Feste" and when i search for "Feste" it would be found. But if i try "Feste
Scherz" then i would not be found. How to solve this? Is there a way?
Thanks Stefan
Am Sonntag, 11. Januar 2015 16:42:57 UTC+1 schrieb Stefan Kruse:
Hi, i need a fuzzy or "like" search for the elasticsearch php client.
I have a field called name, and there are values like testone, testtwo,
testthree.
Now i need a search for a searchstring like test. There should come all
values.
It should be straightforward to write this as PHP code. If you want to
find any word parts instead of only prefixes you could use a wildcard
query instead:
But keep in mind that it is much faster if you prepare the data at index
time using ngram filters:
By the way, in case you don't know how to test the examples above, I
recommend using Marvel on your development machine:
Hi Hannes,
thanks for replay. But i dont get it to work.
I made some chages. In my database i have the value"Scherzartikel für
Feste" and when i search for "Feste" it would be found. But if i try "Feste
Scherz" then i would not be found. How to solve this? Is there a way?
Thanks Stefan
Am Sonntag, 11. Januar 2015 16:42:57 UTC+1 schrieb Stefan Kruse:
Hi, i need a fuzzy or "like" search for the elasticsearch php client.
I have a field called name, and there are values like testone, testtwo,
testthree.
Now i need a search for a searchstring like test. There should come all
values.
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.