Hi Stefan,

maybe this helps:
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/partial-matching.html

You can query for term prefixes and complex patterns:
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/prefix-query.html
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_wildcard_and_regexp_queries.html

But use it with care as it is rather slow. To speed it up you might want to use n-grams at index time:
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_index_time_search_as_you_type.html

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.

How do i make this?

I try:

$params = array();
$params['index'] = 'myIndex';
$params['type'] = 'myType';
$params['body']['query']['match or fuzzy']['name'] = 'test';

$ret = $client->search($params);

Does anybody has an idea or hint for me?

Thanks
Stefan


--
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/54B2C3C7.3090603%40hkorte.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to