Erik,

Thanks for your suggestions.  After I made all field names [a-zA-Z0-9_] and 
turned on debugQuery=true, I saw that the query was using something like 
"text^0.5", which is beyond my current comprehension.  I commented out those 
"<field>^0.5" type settings in solrconfig.xml.  Now the search works a little 
better, but still far from perfect.  Now if I search for a term, say "335", the 
query is:


+DisjunctionMaxQuery((gene_symbol:335))

The field referenced above, "gene_symbol", is the default search field I set in 
schema.xml.  Searching against this field alone is not the default search 
behavior I would like.  What I'd like is that when I search for a term, Solr 
should search it against every indexed field.  What's the best way to make that 
happen?  I know one way is to set the default search field to the catch-all 
field "text", which gets populated by calling <copyField> for each document 
field.  However I'm not sure if this is the best way.




________________________________
 From: Erick Erickson <erickerick...@gmail.com>
To: solr-user@lucene.apache.org; Yuhao <nfsvi...@yahoo.com> 
Sent: Wednesday, February 1, 2012 7:57 PM
Subject: Re: Help: nothing is searchable in Solr
 
I really, really, really don't like the fact that you have a space in your
field name. Adding &debugQuery=on to your query should show
you the results of parsing the query. What I *expect*, but haven't
tested, is one of two things:
1> the query parser interprets Entrez ID:335 as something like
     defaultsearchfield:Entrez ID:335
    in fact, I'm surprised it doesn't throw an error unless you have
    a field named ID......
2> you aren't specifying the field in the first place and you're
     getting defaultsearchfield:335


Please do yourself a favor and use lowercase and underscores for
your field names, historically, there have been some corner cases
where capitals produce surprising results, in some of the contribs as
I remember....

If none of this is the problem, can you post the results of adding
&debugQuery=on to your URL?

Best
Erick

On Wed, Feb 1, 2012 at 6:17 PM, Yuhao <nfsvi...@yahoo.com> wrote:
> Oops, you're right about the typo!  However, after I changed it to:
>
>     <field multiValued="false" name="Entrez ID" type="string" indexed="true" 
> stored="true" required="true" />
>
>
> , searching for "335" still returns no result.  I did delete the index and 
> re-index the documents after the change.  Interestingly, adding * to the 
> search does produce results, and it seems to be the only way to find anything.
>
> * by itself finds 549/757 results.
> *:* finds all 757 results.
> *[a-zA-Z]* finds nothing.
> *[0-9]* finds some results.  For example, *33* finds 7 results, but it does 
> NOT find the doc with id=335.
>
>
> The results are interesting because I definitely have many indexed fields 
> with [a-zA-Z] characters, but nothing at all is found.
>
>
>
> ________________________________
>  From: Ahmet Arslan <iori...@yahoo.com>
> To: solr-user@lucene.apache.org; Yuhao <nfsvi...@yahoo.com>
> Sent: Wednesday, February 1, 2012 5:59 PM
> Subject: Re: Help: nothing is searchable in Solr
>
>> For example, I defined a field called "Entrez ID" in my
>> schema.xml file:
>>
>>     <field multiValued="false" name="Entrez ID"
>> type="string" index="true" stored="true" required="true"
>> />
>
> It could be the typo: index="true" should be indexed="true"

Reply via email to