Hi, new to all this ES and overwhelmed by all the options and syntax.
I (currently) only have 2 fields, company name and company number. I want
to search company names.
I have a a really simple search to do and cannot get the order I want (or
would expect)
I set up like:-
curl -XPOST 'http://localhost:9200/playcompany'
then run a bunch of :-
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"06026916", "name" : "FRASERS VENTURES LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"01366799", "name" : "SUPPORT SERVICES LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"01349558", "name" : "MCGINLEY SUPPORT SERVICES LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"01409241", "name" : "SUPPORT SERVICES (FILMS) LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"01470672", "name" : "A.C.S. (CONSULTANCY AND SUPPORT SERVICES) LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"01475234", "name" : "GENERAL SUPPORT AND HANDLING SERVICES LIMITED" }'
curl -XPOST 'http://localhost:9200/playcompany/companies/' -d '{ "number" :
"02795677", "name" : "SUPPORT SERVICES LIMITED" }'
etc
to load up only 127 for testing. Mapping shows:-
curl -XGET 'http://localhost:9200/playcompany/companies/_mapping?pretty'
{
"companies" : {
"properties" : {
"name" : {
"type" : "string"
},
"number" : {
"type" : "string"
}
}
}
}
ALL I need is sensible matches, matches that humans would expect, in an
order that humans would expect.
when I do a simple :-
curl -XGET
'http://localhost:9200/playcompany/companies/_search?q=name:support%20services%20limited&pretty=true'
I would hope to get "SUPPORT SERVICES LIMITED" as the first hit, followed
by other 'relevant' results, in some sort of explainable order.
'relevant' to me (or human searchers) means that the more words that
match, the more relevant. so 3 out of 3 words match should be the top, 3
out of 4 also pretty relevant. 3 words matched out of 6 words for example
are deemed less relevant.
I would hope to also like to match plurals and common endings, so I would
like a search for "SUPPORT SERVICES LIMITED" to also match "SUPPORT SERVICE
LIMITED" (singular) , but not as high as the exact match "SUPPORT SERVICES
LIMITED".
hope this makes sense. With only 10 or so names loaded, I get mostlt what I
want, but as soon as I load up over 100, the order goes out the window and
the _score values are all the same after the first 2 or 3 matches.
How do I do this?
Sorry this is such a long post, first one and not sure where to start.
Any help (more importantly examples that I can copy and paste to try out)
would be invaluable.
Thanks for you time, appreciated.
MArk Williams
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.