Re: sub query parsing bug???

2011-12-12 Thread Steve Fuchs
Thanks for the reply!

I do believe I have set (or have tried setting) all of those options for the 
default query and none of them seem to help. Anytime an OR appears inside the 
query the default for that query becomes OR. At least thats the anecdotal 
evidence I've encountered.
Also in this case the results do match what the parser is telling me, so I'm 
not getting the results I expect.

As for the second suggestion, the actual fields searched are controlled by the 
user, so it can get more complicated. But even in the single field search I do 
believe I need to use the edismax parser. I have tried the regular query syntax 
for searching one field and find that it can't handle the more complex queries.

Something like 
ref_expertise:(nonlinear OR soliton) AND optical lattice

won't return any documents even though there are many that satisfy those 
requirements. Is there some other way I could be executing this query even in 
the single field case?

Thanks and Thanks in Advance for all help

Steve





On Dec 6, 2011, at 8:26 AM, Erick Erickson wrote:

 Hmmm, does this help?
 
 In Solr 1.4 and prior, you should basically set mm=0 if you want the
 equivilent of q.op=OR, and mm=100% if you want the equivilent of
 q.op=AND. In 3.x and trunk the default value of mm is dictated by the
 q.op param (q.op=AND = mm=100%; q.op=OR = mm=0%). Keep in mind the
 default operator is effected by your schema.xml solrQueryParser
 defaultOperator=xxx/ entry. In older versions of Solr the default
 value is 100% (all clauses must match)
 (from http://wiki.apache.org/solr/DisMaxQParserPlugin).
 
 I don't think you'll see the query parsed as you expect, but the
 results of the query
 should be what you expect. Tricky, eh?
 
 I'm assuming you've simplified the example for clarity and your qf
 will be on more than one field when you use it for real, but if not
 the actual query doesn't need edismax at all.
 
 Best
 Erick
 
 On Mon, Dec 5, 2011 at 10:52 AM, Steve Fuchs st...@aps.org wrote:
 Hello All,
 
 I have my field description listed below, but I don't think its pertinent. 
 As my issue seems to be with the query parser.
 
 I'm currently using an edismax subquery clause to help with my searching as 
 such:
 
 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) AND 
 \optical lattice\
 
 translates correctly to
 
 +(+((ref_expertise:nonlinear) (ref_expertise:soliton)) 
 +(ref_expertise:optical lattice))
 
 
 but the users expect the default operator to be AND (it is in all simpler 
 searches), however nothing I can do here gets me that same result as above 
 when the search is:
 
 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) 
 \optical lattice\
 
 this gets converted to:
 
 +(((ref_expertise:nonlinear) (ref_expertise:soliton)) 
 (ref_expertise:optical lattice))
 
 where the optical lattice is optional.
 
 These produce the same results, trying q.op and mm. Also the default search 
 term as  set in the solr.config is AND.
 
 _query_:{!type=edismax q.op=AND qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\
 _query_:{!type=edismax mm=1.0 qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\
 
 
 
 
 Any ideas???
 
 Thanks In Advance
 
 Steven Fuchs
 
 
 
 
 
 
fieldType name=intl_string class=solr.TextField 
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.WordDelimiterFilterFactory preserveOriginal=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.ASCIIFoldingFilterFactory /
filter class=solr.EdgeNGramFilterFactory minGramSize=2 
 maxGramSize=25 /
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.ASCIIFoldingFilterFactory /
  /analyzer
/fieldType
 
 
 
 
 
 
 
 
 



Re: sub query parsing bug???

2011-12-12 Thread Erick Erickson
Well, your query below becomes ref_expertise:(nonlinear OR soliton)
AND default_search:optical lattice:

The regular Solr/Lucene query should handle pretty much anything you
can throw at it. But do be aware that Solr/Lucene syntax is not true
boolean logic, you have to think in terms of SHOULD, MUST, MUST_NOT.

But this works:
q={!type=edismax qf='name' }(nonlinear OR soliton) AND optical lattice
giving this:
+(+((name:nonlinear) (name:soliton)) +(name:optical lattice))

Best
Erick

On Mon, Dec 12, 2011 at 3:29 PM, Steve Fuchs st...@aps.org wrote:
 Thanks for the reply!

 I do believe I have set (or have tried setting) all of those options for the 
 default query and none of them seem to help. Anytime an OR appears inside the 
 query the default for that query becomes OR. At least thats the anecdotal 
 evidence I've encountered.
 Also in this case the results do match what the parser is telling me, so I'm 
 not getting the results I expect.

 As for the second suggestion, the actual fields searched are controlled by 
 the user, so it can get more complicated. But even in the single field search 
 I do believe I need to use the edismax parser. I have tried the regular query 
 syntax for searching one field and find that it can't handle the more complex 
 queries.

 Something like
 ref_expertise:(nonlinear OR soliton) AND optical lattice

 won't return any documents even though there are many that satisfy those 
 requirements. Is there some other way I could be executing this query even in 
 the single field case?

 Thanks and Thanks in Advance for all help

 Steve





 On Dec 6, 2011, at 8:26 AM, Erick Erickson wrote:

 Hmmm, does this help?

 In Solr 1.4 and prior, you should basically set mm=0 if you want the
 equivilent of q.op=OR, and mm=100% if you want the equivilent of
 q.op=AND. In 3.x and trunk the default value of mm is dictated by the
 q.op param (q.op=AND = mm=100%; q.op=OR = mm=0%). Keep in mind the
 default operator is effected by your schema.xml solrQueryParser
 defaultOperator=xxx/ entry. In older versions of Solr the default
 value is 100% (all clauses must match)
 (from http://wiki.apache.org/solr/DisMaxQParserPlugin).

 I don't think you'll see the query parsed as you expect, but the
 results of the query
 should be what you expect. Tricky, eh?

 I'm assuming you've simplified the example for clarity and your qf
 will be on more than one field when you use it for real, but if not
 the actual query doesn't need edismax at all.

 Best
 Erick

 On Mon, Dec 5, 2011 at 10:52 AM, Steve Fuchs st...@aps.org wrote:
 Hello All,

 I have my field description listed below, but I don't think its pertinent. 
 As my issue seems to be with the query parser.

 I'm currently using an edismax subquery clause to help with my searching as 
 such:

 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) AND 
 \optical lattice\

 translates correctly to

 +(+((ref_expertise:nonlinear) (ref_expertise:soliton)) 
 +(ref_expertise:optical lattice))


 but the users expect the default operator to be AND (it is in all simpler 
 searches), however nothing I can do here gets me that same result as above 
 when the search is:

 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) 
 \optical lattice\

 this gets converted to:

 +(((ref_expertise:nonlinear) (ref_expertise:soliton)) 
 (ref_expertise:optical lattice))

 where the optical lattice is optional.

 These produce the same results, trying q.op and mm. Also the default search 
 term as  set in the solr.config is AND.

 _query_:{!type=edismax q.op=AND qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\
 _query_:{!type=edismax mm=1.0 qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\




 Any ideas???

 Thanks In Advance

 Steven Fuchs






    fieldType name=intl_string class=solr.TextField 
      analyzer type=index
        tokenizer class=solr.WhitespaceTokenizerFactory/
        filter class=solr.WordDelimiterFilterFactory 
 preserveOriginal=1/
        filter class=solr.LowerCaseFilterFactory/
        filter class=solr.ASCIIFoldingFilterFactory /
        filter class=solr.EdgeNGramFilterFactory minGramSize=2 
 maxGramSize=25 /
      /analyzer
      analyzer type=query
        tokenizer class=solr.WhitespaceTokenizerFactory/
        filter class=solr.LowerCaseFilterFactory/
        filter class=solr.ASCIIFoldingFilterFactory /
      /analyzer
    /fieldType












Re: sub query parsing bug???

2011-12-06 Thread Erick Erickson
Hmmm, does this help?

In Solr 1.4 and prior, you should basically set mm=0 if you want the
equivilent of q.op=OR, and mm=100% if you want the equivilent of
q.op=AND. In 3.x and trunk the default value of mm is dictated by the
q.op param (q.op=AND = mm=100%; q.op=OR = mm=0%). Keep in mind the
default operator is effected by your schema.xml solrQueryParser
defaultOperator=xxx/ entry. In older versions of Solr the default
value is 100% (all clauses must match)
(from http://wiki.apache.org/solr/DisMaxQParserPlugin).

I don't think you'll see the query parsed as you expect, but the
results of the query
should be what you expect. Tricky, eh?

I'm assuming you've simplified the example for clarity and your qf
will be on more than one field when you use it for real, but if not
the actual query doesn't need edismax at all.

Best
Erick

On Mon, Dec 5, 2011 at 10:52 AM, Steve Fuchs st...@aps.org wrote:
 Hello All,

 I have my field description listed below, but I don't think its pertinent. As 
 my issue seems to be with the query parser.

 I'm currently using an edismax subquery clause to help with my searching as 
 such:

 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) AND 
 \optical lattice\

 translates correctly to

 +(+((ref_expertise:nonlinear) (ref_expertise:soliton)) 
 +(ref_expertise:optical lattice))


 but the users expect the default operator to be AND (it is in all simpler 
 searches), however nothing I can do here gets me that same result as above 
 when the search is:

 _query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) \optical 
 lattice\

 this gets converted to:

 +(((ref_expertise:nonlinear) (ref_expertise:soliton)) (ref_expertise:optical 
 lattice))

 where the optical lattice is optional.

 These produce the same results, trying q.op and mm. Also the default search 
 term as  set in the solr.config is AND.

 _query_:{!type=edismax q.op=AND qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\
 _query_:{!type=edismax mm=1.0 qf='ref_expertise'}\(nonlinear OR 
 soliton\)\optical lattice\




 Any ideas???

 Thanks In Advance

 Steven Fuchs






    fieldType name=intl_string class=solr.TextField 
      analyzer type=index
        tokenizer class=solr.WhitespaceTokenizerFactory/
        filter class=solr.WordDelimiterFilterFactory preserveOriginal=1/
        filter class=solr.LowerCaseFilterFactory/
        filter class=solr.ASCIIFoldingFilterFactory /
        filter class=solr.EdgeNGramFilterFactory minGramSize=2 
 maxGramSize=25 /
      /analyzer
      analyzer type=query
        tokenizer class=solr.WhitespaceTokenizerFactory/
        filter class=solr.LowerCaseFilterFactory/
        filter class=solr.ASCIIFoldingFilterFactory /
      /analyzer
    /fieldType











sub query parsing bug???

2011-12-05 Thread Steve Fuchs
Hello All,

I have my field description listed below, but I don't think its pertinent. As 
my issue seems to be with the query parser.

I'm currently using an edismax subquery clause to help with my searching as 
such:

_query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) AND 
\optical lattice\

translates correctly to

+(+((ref_expertise:nonlinear) (ref_expertise:soliton)) +(ref_expertise:optical 
lattice))


but the users expect the default operator to be AND (it is in all simpler 
searches), however nothing I can do here gets me that same result as above when 
the search is:

_query_:{!type=edismax qf='ref_expertise'}\(nonlinear OR soliton\) \optical 
lattice\

this gets converted to:

+(((ref_expertise:nonlinear) (ref_expertise:soliton)) (ref_expertise:optical 
lattice))

where the optical lattice is optional.

These produce the same results, trying q.op and mm. Also the default search 
term as  set in the solr.config is AND.

_query_:{!type=edismax q.op=AND qf='ref_expertise'}\(nonlinear OR 
soliton\)\optical lattice\
_query_:{!type=edismax mm=1.0 qf='ref_expertise'}\(nonlinear OR 
soliton\)\optical lattice\




Any ideas???

Thanks In Advance

Steven Fuchs






fieldType name=intl_string class=solr.TextField 
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.WordDelimiterFilterFactory preserveOriginal=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.ASCIIFoldingFilterFactory /
filter class=solr.EdgeNGramFilterFactory minGramSize=2 
maxGramSize=25 /
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.ASCIIFoldingFilterFactory /
  /analyzer
/fieldType