Hi Paul,
The data that I'm indexing is run through a nodejs script which
indexes document of structure:
{"_id: "59d434se999ab",
"object_id": "2343_document_2434",
"type": "document",
"project_id": 4566,
"verbose": "Presentation - Process för Projectplace i Jira.ppt (uppdaterad
130610).pptx",
"_source": {........}}
Now the analyzer is run only on "verbose" which splits it into tokens.
Then I run the below query to fetch results:
curl -XGET 'http://pp-feedsdb-1:9200/verbose/items/_search?pretty=true' -d
'{
"query": {
"filtered": {
"query" : {
"query_string" : {
"default_field": "verbose",
"query": "jira",
"analyzer": "my_standard"
}
},
"filter" : {
"term" : { "project_id" : 4566 }
}
}
}
}'
The result doesn't show the entry "Presentation - Process för Projectplace
i Jira.ppt (uppdaterad 130610).pptx" but if I search for "jira.ppt" it does
show.
I'm guessing if the tokenizer is wrongly configured or not working in my
setup.
The settings of the index which I'm using are:
curl -XGET 'http://pp-feedsdb-1:9200/verbose/_settings?pretty=true =>
{
"verbose" : {
"settings" : {
"index.number_of_shards" : "5",
"index.number_of_replicas" : "1",
"index.version.created" : "900099",
"index.analysis.char_filter.my_filter.mappings.1" : "_=>,",
"index.analysis.char_filter.my_filter.mappings.0" : "'=>",
"index.analysis.analyzer.my_standard.filter.3" : "word_delimiter",
"index.analysis.analyzer.my_standard.type" : "custom",
"index.analysis.char_filter.my_filter.type" : "mapping",
"index.analysis.analyzer.my_standard.tokenizer" : "standard",
"index.analysis.char_filter.my_filter.mappings.2" : "-=>,",
"index.analysis.analyzer.my_standard.filter.2" : "stop",
"index.analysis.analyzer.my_standard.filter.1" : "lowercase",
"index.analysis.analyzer.my_standard.char_filter.0" : "my_filter",
"index.analysis.analyzer.my_standard.filter.0" : "standard"
}
}
}
Kindly let me know if you need more details
Thanks
K
On Tuesday, July 2, 2013 6:10:55 AM UTC+5:30, ppearcy wrote:
Hi Kailash,
Do you have an example of what you are indexing and the failing query?
I don't see the "title" field in your mappings, could that be the issue?
Thanks,
Paul
On Monday, July 1, 2013 11:38:43 AM UTC-6, Kailash ź Reddy wrote:
Settings of one of my index:
"settings" : {
"index" : {
"analysis" : {
"char_filter" : {
"my_filter" : {
"type" : "mapping",
"mappings" : ["'''=>", "_=>,", "-=>,"]
}
},
"analyzer" : {
"my_standard" : {
"type": "custom",
"tokenizer" : "standard",
"char_filter" : ["my_filter"],
"filter" : ["standard", "lowercase", "stop",
"word_delimiter"]
}
}
}
}
}
Mapping:
{"search_type": {
"properties": {
"verbose": {"type": "string", "analyzer": "my_standard"},
"object_id": {"type": "long", "index": "no"},
"type": {"type": "string", "index": "no"},
"project_id": {"type": "long"},
"ts": {"type": "long", "index": "no"},
"context": {"type": "string", "index": "no"}
}
}
}
Now there is a document with title: Presentation - Process för
Projectplace i Jira.ppt (uppdaterad 130610).pptx
And now I search for "jira"
The search result doesn't show the above result.
The query which I use is:
curl -XGET 'http://xxxx:9200/verbose/items/_search?pretty=true' -d '{
"query": {
"filtered": {
"query" : {
"query_string" : {
"default_field": "verbose",
"query": "jira",
"analyzer": "my_standard"
}
},
"filter" : {
"term" : { "project_id" : 1234 }
}
}
}
}'
I'm not able to figure out what is the wrong thing I'm doing here :(, any
help here will save my day!
/Kailash
--
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.