On Mon, Nov 8, 2010 at 3:50 PM, Renato Wesenauer <renato.wesena...@gmail.com> wrote: > > Hi Ahmet Arslan, > > I'm using this in schema.xml: > <field name="secao" type="cleannormalized_text" indexed="true" > stored="true"/> > <field name="indativo" type="boolean" indexed="true" stored="true"/> > > I'm using this in dataimporthandler: > <field column="secao" xpath="/ROW/NomeSecaoMix" /> > <field column="indativo" template="0" /> > > The indexing process work correctly, but it's happening something wrong with > the results of queries. > > All queries with some field with 2 words or more, plus the field > "indativo:true", it isn't returning any result. > > Example of queries: > > 1º) secao:"accessories for cars" AND indativo:true > 2º) secao:"accessories for cars" AND indativo:false > > The first query returns 0 results, but there are 40.000 documents indexed > with these fields. > The second query returns 300.000 documents, but 300.000 is the total of > documents for query secao:"celular e telefonia", the correct would be > 260.000. > > Another example: > 1º) secao:"toys" AND indativo:true > 2º) secao:"toys" AND indativo:false > > In this example, the two queries work correctly. > > The problem happens with values with 2 words or more, plus the "indativo" > field. > > Do you know what can be happening? > > Thank you, > > Renato F. Wesenauer >
Renato, Correct me if I'm wrong, but you have an entity that you explicitly set to a false value for the "indativo" field. And when you query, is your intention to find the fields that were not indexed through that entity? The way that I am reading your question is that you are expecting the indativo field to be true by default, but I do not see where you're explicitly stating that in your schema. The reason that I bring this up is - and I could be wrong - I would think that if you do not set a value in SOLR, then it doesn't exist (either in the schema, or during indexing). If you are expecting the other entries where indativo was explicitly set to false to be true, you might need to tweak your schema so that the field definition is by default "true". Is it possible to try adding the default attribute to your field definition and reindexing to see if that gives you what you're looking for? - Ken Stanley PS. If this came through twice, I apologize; I got a bounce-back saying my original reply was blocked, so I'm trying to re-send as plain text.