Re: have we a way to use highlight and fuzzy together ?

2014-07-07 Thread Tanguy Bernard
I want to combine like this :

GET my_index/my_type/_search?pretty=true
{"size": 50,

"query": {
 
"multi_match": {
"query":  "my words",
   
"fields": ["title_doc"]

},*"fuzzy": 0.2*
}, 
*"highlight" : {*
   
*"fields" : {*
*"title_doc" : { "fragment_size" : 30**}*
*}*
*},*
"sort": [
   {
  "date_source": {
 "order": "desc"
  }
   }
]
   

}

Can you help me ?

Tanguy

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/af25f933-be1e-4df5-9c15-ab494b5d31b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: have we a way to use highlight and fuzzy together ?

2014-07-07 Thread Tanguy Bernard
I want to combine like this :

GET my_index/my_type/_search?pretty=true
{"size": 50,

"query": {
*"fuzzy": 0.2,* 
"multi_match": {
"query":  "my words",
   
"fields": ["title_doc"]

}
}, 
*"highlight" : {*
*"order" : "date_doc",*
*"fields" : {*
*"title_doc" : { "fragment_size" : 30**}*
*}*
*}*
   


}

Can you help me ?

Tanguy

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/8e56e849-ca0a-4c3c-9183-c928d4236e77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: have we a way to use highlight and fuzzy together ?

2014-07-02 Thread Nikolas Everett
On Wed, Jul 2, 2014 at 6:47 AM, Tanguy Bernard 
wrote:

Hello
> Everything is on subject
> I have to use fuzzy for my fileds (title,content) and when I'm searching I
> want to see a part of the sentance where my keyword is.
>
> This, together, doesn't work:
> $params['body']['highlight']['fields'][$value]['fragment_size']=30;
> $params['body']['query']['fuzzy']=0.2;
>
> Have we a way to use highlight and fuzzy together or an other way
> equivalent ?
>
>
Usually its better to show a recreation with curl.  PHP isn't always
understood.

Vocabulary point: fuzzy, prefix, and regex queries are called "multi term
queries".

Anyway, there are three highlighters built in to Elasticsearch all of which
have different feature sets.  I'm not sure if the plain highlighter
supports multi term queries, but you can try the fast vector highlighter or
the postings highlighter which do support multi term queries.  See
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html

For completeness sake I should mention that I maintain a fourth highlighter
that also supports multi term queries but it is a plugin:
https://github.com/wikimedia/search-highlighter

Nik

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPmjWd02ok9w%2B9U47bdmT78JvxP%3D41kpPBpOyRCGmXH71J4a5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


have we a way to use highlight and fuzzy together ?

2014-07-02 Thread Tanguy Bernard
Hello
Everything is on subject
I have to use fuzzy for my fileds (title,content) and when I'm searching I 
want to see a part of the sentance where my keyword is.

This, together, doesn't work:
$params['body']['highlight']['fields'][$value]['fragment_size']=30;
$params['body']['query']['fuzzy']=0.2;

Have we a way to use highlight and fuzzy together or an other way 
equivalent ?


Thank to you in advance.

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b6628cb4-7e2c-4e21-b578-a14865450a83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.