Hi,
I'm new to elasticsearch, but already very impressed.
But actually I stuck with the following problem:
This is part of my mapping:
"mappings" : {
"content" : {
"properties" : {
"contentid" : { "type" : "string", "index" : "not_analyzed",
"store" : "yes" },
"title" : { "type" : "string", "boost" : "3", "store" : "yes" },
"categoryids" : {
"type" : "multi_field",
"fields" : {
"categoryids" : { "type" : "string", "index" :
"not_analyzed", "store" : "yes" },
"facet" : { "type" : "string", "index" : "not_analyzed" }
}
},
"summary" : { "type" : "string", "boost" : "3", "store" : "yes",
"index" : "analyzed", "analyzer" : "german" },
"body" : { "type" : "string", "index" : "analyzed", "analyzer" :
"german", "store" : "yes" },
"searchexclude" : { "type" : "byte", "store" : "yes",
"null_value" : "0" },
....
What I need is a fulltext search over several fields of my records (title,
summary, body, etc.).
This is my actual query that works fine:
GET _search
{
"query": {
"query_string": {
"query": "mySearchTerm"
}
}
,"highlight" : {
"fields" : {
"body" : {}
}
}
,"sort" : [
"_score",
{ "jahr" : {"order" : "desc"}}
]
,"fields" : ["summary","title","filename","categoryid"]
};
But now I want only records searched where searchexlude=0 and a specific
categoryid.
That's the point, where I stuck.
How can I do a fulltextsearch but only on specifix records?
What I read in the documentation is, that I need a filtered query, but I
always get bad requests. Also I read, that filtering means loosing the
score.
Any help apreciated.
Thanks,
Michi
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/75eb4771-3979-4ad8-9a29-563ae7f5c4af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.