Is "Will" or "will" reserved for sorting?


(samCougars) #1

I have "will" as value on one of my indexed field(firstNameSort). When I do a sorting on that particular field(firstNameSort), the recored with "will" on that field shows up on top. Has anyone seen this issue?
Here is my curl command:
{
"size" : 300,
"query" : {
"match_all" : {
}
},
"sort" : [ {
"firstNameSort" : {
"order" : "asc"
}
} ]
}


(David Pilato) #2

Do you use default analyzer ?

If so, i suppose that will is not indexed as it's an english common verb.

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 août 2012 à 18:03, samCougars sbaniya@gmail.com a écrit :

I have "will" as value on one of my indexed field(firstNameSort). When I do a
sorting on that particular field(firstNameSort), the recored with "will" on
that field shows up on top. Has anyone seen this issue?
Here is my curl command:
{
"size" : 300,
"query" : {
"match_all" : {
}
},
"sort" : [ {
"firstNameSort" : {
"order" : "asc"
}
} ]
}

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Is-Will-or-will-reserved-for-sorting-tp4022341.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

--


(samCougars) #3

I'm not using any kind of analyzer at all. So with that, it might be just using default analyzer then. How would I add "will" as a common verb?


(David Pilato) #4

Just to be sure, that's the issue, try to set analyze to no for that field, reindex and search with sort.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 août 2012 à 19:15, samCougars sbaniya@gmail.com a écrit :

I'm not using any kind of analyzer at all. So with that, it might be just
using default analyzer then. How would I add "will" as a common verb?

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Is-Will-or-will-reserved-for-sorting-tp4022341p4022343.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

--


(samCougars) #5

Thanks David. I added to ignore built-in stop words from lucene on my config file since I'm already removing stop words in my app. And now it is working fine. By the way, it was not just word "will", it had to do with all stop words...
Here is the config I added on elasticsearch.yml :
#Index Settings
index:
analysis:
analyzer:
# set standard analyzer with no stop words as the default for both indexing and searching
default:
type: standard
stopwords: none


(David Pilato) #6

Thanks for the feedback. I was not aware of the none stopwords config.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 août 2012 à 22:08, samCougars sbaniya@gmail.com a écrit :

Thanks David. I added to ignore built-in stop words from lucene on my config
file since I'm already removing stop words in my app. And now it is working
fine. By the way, it was not just word "will", it had to do with all stop
words...
Here is the config I added on elasticsearch.yml :
#Index Settings
index:
analysis:
analyzer:
# set standard analyzer with no stop words as the default for both
indexing and searching
default:
type: standard
stopwords: none

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Is-Will-or-will-reserved-for-sorting-tp4022341p4022357.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

--


(system) #7