Looks like that I claim victory too soon
After a night spent indexing all my documents I'm stuck with the same
problem:
curl -XPOST http://localhost:9200/alessandria/book/_search? -d
'{ query: { "query_string": { "query": "cervello" } } }'
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}
but the document, one of the many with the word "cervello", exists
curl -XGET http://localhost:9200/alessandria/book/9788862204781
{"_index":"alessandria","_type":"book","_id":"9788862204781","_version":
4,"exists":true, "_source" : {... "title": "Il cervello e l'arte di
imparare. Apprendimento e memoria nello sviluppo del bambino", ... }}
Following an advice on this thread I added an explicit mapping for the
_all field, but with no luck.
After a reindex of the 9788862204781 document and a server restart the
search finally returns one, and only one, results.
thank you for any advice
david
On Nov 17, 10:47 pm, dvd d...@gnx.it wrote:
Hi Shay,
thank you for your time!
I've run a test with the new version (0.18.4) and, on a newly created
index, it seems to work fine!
Unfortunately, querying the old index doesn't work until I indexed
again the document.
My main index has more than 900k documents, is there a way to rebuild
this index without submit all documents again?
david
On Nov 17, 2:40 pm, Shay Banon kim...@gmail.com wrote:
I double checked on 0.18.3, and I see the _all field using the correct
analyzer (the custom default one), though I suspect that another bug fix in
0.18.3 fixed this one as well indadvertedly. In any case, I pushed a change
that will make sure this will not happen, regardless of the other fix.
If you still have problems with 0.18.3, gist a simple recreation, with your
config, some sample curl requests that index data, and then your search
requests that fail.
-shay.banon
On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon kim...@gmail.com wrote:
Can you try and explicitly set the italian analyzer on the _all field as
well, there might be a problem where the _all field will not use the
default analyzer configured for an index.
On Thu, Nov 17, 2011 at 1:19 AM, dvd d...@gnx.it wrote:
index settings:
{
"number_of_shards" : 5,
"analysis": {
"analyzer": {
"default": {
"alias": ["italian"],
"type": "italian"
}
}
}
}
type mapping
{
'properties': {
'ean': {
'type': 'string',
'index': 'not_analyzed',
},
'title': {
'type': 'string',
'index': 'analyzed',
'boost': 5.0,
},
'authors': {
'properties': {
'name': {
'type': 'string',
'index': 'not_analyzed',
'boost': 2.0,
},
},
},
'publisher': {
'type': 'string',
'index': 'not_analyzed',
},
'description': {
'type': 'string',
'index': 'analyzed',
},
},
}
and document structure:
{
'authors': [{'name': ''}],
'description': '',
'ean': '',
'publisher': {'code': '', 'name': ''},
'title': ''
}