vijuitech
(vijuitech)
July 27, 2012, 7:08am
1
Hi,
I am using the analyzer as
"post" : { "type" : "string", "store" : "yes", "index" :
"analyzed","analyzer":"whitespace", "boost" : 3.0 },
I indexed the following text in the post field: "Learn the latest
about new and updated mobile products"
While searching the Text "Learn" from the post field I am not getting
the results. but I can get the results while searching all other
words.
How can I rectify this?
Thanks!
Cheers!
George
Ivan
(Ivan Brusic)
July 27, 2012, 4:32pm
2
The whitespace analyzer does not lowercase the tokens. You would need
to define a custom analyzer that uses a whitespace and lowecase
filter.
curl 'http://localhost:9200/_analyze?analyzer=whitespace&pretty=true '
-d 'Learn the latest
about new and updated mobile products'
{
"tokens" : [ {
"token" : "Learn",
"start_offset" : 0,
"end_offset" : 5,
"type" : "word",
"position" : 1
}, {
"token" : "the",
"start_offset" : 6,
"end_offset" : 9,
"type" : "word",
"position" : 2
}, ...
Ivan
On Fri, Jul 27, 2012 at 12:08 AM, George Viju vijuitech@gmail.com wrote:
Hi,
I am using the analyzer as
"post" : { "type" : "string", "store" : "yes", "index" :
"analyzed","analyzer":"whitespace", "boost" : 3.0 },
I indexed the following text in the post field: "Learn the latest
about new and updated mobile products"
While searching the Text "Learn" from the post field I am not getting
the results. but I can get the results while searching all other
words.
How can I rectify this?
Thanks!
Cheers!
George