Re: String search in Dismax handler

2012-02-24 Thread mechravi25
Hi,

I had posted two different query strings by mistake. PFB the correct strings
when Pass by value is the search word
 
String given without quotes

webapp=/solr path=/select/
params={facet=truef.typeFacet.facet.mincount=1qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3hl.fl=*hl=truef.rFacet.facet.mincount=1rows=10fl=*start=0q=pass+by+valuefacet.field=typeFacetfacet.field=rFacetqt=dismax}
hits=0 status=0 QTime=63
 
and the parsed query for the same is as follows
 
str name=parsedquery+((DisjunctionMaxQuery((xid:pass^0.3 | id:pass^0.3 |
x_name:pass^0.3 | text:pass | name:pass^2.3))
DisjunctionMaxQuery((xid:by^0.3 | id:by^0.3))
DisjunctionMaxQuery((xid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
text:value | name:value^2.3)))~3) ()/str  
str name=parsedquery_toString+(((xid:pass^0.3 | id:pass^0.3 |
x_name:pass^0.3 | text:pass | name:pass^2.3) (xid:by^0.3 | id:by^0.3)
(xid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
name:value^2.3))~3) ()/str  

String given with quotes

webapp=/solr path=/select/
params={facet=trueqf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3f.typeFacet.facet.mincount=1hl.fl=*f.rFacet.facet.mincount=1hl=truerows=10fl=*start=0q=pass+by+valuefacet.field=typeFacetfacet.field=rFacetqt=dismax}
hits=4 status=0 QTime=411 
 
and its parsed query is
 
str name=parsedquery+DisjunctionMaxQuery((xid:pass by value^0.3 |
id:pass by value^0.3 | x_name:pass ? value^0.3 | text:pass ? value |
name:pass ? value^2.3)) ()/str 
 
str name=parsedquery_toString+(xid:pass by value^0.3 | id:pass by
value^0.3 | x_name:pass ? value^0.3 | text:pass ? value | name:pass ?
value^2.3) ()/str  

and also I am using diffrent field type for id and xid and it uses
solr.StrField as its class so, we have not used the solr.StopFilterFactory
for it. the field type is as follows
 
fieldtype name=string class=solr.StrField sortMissingLast=true
omitNorms=true/
 
But, I have used a different field type for name, text and x_name and this
field type uses solr.TextField as its class and has the
solr.StopFilterFactory as one of its filter. It is as follows
 
fieldType name=textgen class=solr.TextField positionIncrementGap=100
analyzer type=index 
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true /
filter class=solr.WordDelimiterFilterFactory generateWordParts=1
generateintegerParts=1 catenateWords=1 catenateintegers=1
catenateAll=1 splitOnCaseChange=1 splitOnNumerics=1
stemEnglishPossessive=1 /
filter class=solr.LowerCaseFilterFactory/
filter class=solr.PhoneticFilterFactory encoder=Soundex inject=true/
/analyzer
analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true/
filter class=solr.WordDelimiterFilterFactory generateWordParts=1
generateintegerParts=1 catenateWords=0 catenateintegers=0
catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
/analyzer
/fieldType


Please guide me. Thanks.


--
View this message in context: 
http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3772648.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: String search in Dismax handler

2012-02-24 Thread Erick Erickson
Watch out for StringField, that may be where you're having
trouble. Take a close look at your admin/analysis page. If
Pass by Value is matching on a string field when quoted,
that'll explain why it isn't matching when not quoted.

The problem here is that the query parser (before it gets to
the field analysis chain) breaks up unquoted input into separate
tokens, so you have three tokens Pass by Value. But
StringField does NOT analyze input in any way. So your index
contains a *single* token Pass by Value in StringFields
and querying for Pass by Value will NOT match. as it's
looking for three tokens and you only have one indexed.

StringField doesn't change capitalization either. It's almost always
used for machine-generated strings so you don't have this
problem. In fact there's some discussion for deprecating it
since it seems to cause no end of confusion. If you want
something similar that allows you to, for instance, be
case insensitive, consider an analysis chain of
KeywordTokenizer and LowercaseFilter, and, perhaps,
TrimFilter.

Best
Erick

On Fri, Feb 24, 2012 at 9:08 AM, mechravi25 mechrav...@yahoo.co.in wrote:
 Hi,

 I had posted two different query strings by mistake. PFB the correct strings
 when Pass by value is the search word

 String given without quotes

 webapp=/solr path=/select/
 params={facet=truef.typeFacet.facet.mincount=1qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3hl.fl=*hl=truef.rFacet.facet.mincount=1rows=10fl=*start=0q=pass+by+valuefacet.field=typeFacetfacet.field=rFacetqt=dismax}
 hits=0 status=0 QTime=63

 and the parsed query for the same is as follows

 str name=parsedquery+((DisjunctionMaxQuery((xid:pass^0.3 | id:pass^0.3 |
 x_name:pass^0.3 | text:pass | name:pass^2.3))
 DisjunctionMaxQuery((xid:by^0.3 | id:by^0.3))
 DisjunctionMaxQuery((xid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
 text:value | name:value^2.3)))~3) ()/str
 str name=parsedquery_toString+(((xid:pass^0.3 | id:pass^0.3 |
 x_name:pass^0.3 | text:pass | name:pass^2.3) (xid:by^0.3 | id:by^0.3)
 (xid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
 name:value^2.3))~3) ()/str

 String given with quotes

 webapp=/solr path=/select/
 params={facet=trueqf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3f.typeFacet.facet.mincount=1hl.fl=*f.rFacet.facet.mincount=1hl=truerows=10fl=*start=0q=pass+by+valuefacet.field=typeFacetfacet.field=rFacetqt=dismax}
 hits=4 status=0 QTime=411

 and its parsed query is

 str name=parsedquery+DisjunctionMaxQuery((xid:pass by value^0.3 |
 id:pass by value^0.3 | x_name:pass ? value^0.3 | text:pass ? value |
 name:pass ? value^2.3)) ()/str

 str name=parsedquery_toString+(xid:pass by value^0.3 | id:pass by
 value^0.3 | x_name:pass ? value^0.3 | text:pass ? value | name:pass ?
 value^2.3) ()/str

 and also I am using diffrent field type for id and xid and it uses
 solr.StrField as its class so, we have not used the solr.StopFilterFactory
 for it. the field type is as follows

 fieldtype name=string class=solr.StrField sortMissingLast=true
 omitNorms=true/

 But, I have used a different field type for name, text and x_name and this
 field type uses solr.TextField as its class and has the
 solr.StopFilterFactory as one of its filter. It is as follows

 fieldType name=textgen class=solr.TextField positionIncrementGap=100
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.StopFilterFactory ignoreCase=true
 words=stopwords.txt enablePositionIncrements=true /
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 generateintegerParts=1 catenateWords=1 catenateintegers=1
 catenateAll=1 splitOnCaseChange=1 splitOnNumerics=1
 stemEnglishPossessive=1 /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.PhoneticFilterFactory encoder=Soundex inject=true/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
 ignoreCase=true expand=true/
 filter class=solr.StopFilterFactory ignoreCase=true
 words=stopwords.txt enablePositionIncrements=true/
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 generateintegerParts=1 catenateWords=0 catenateintegers=0
 catenateAll=0 splitOnCaseChange=0/
 filter class=solr.LowerCaseFilterFactory/
 /analyzer
 /fieldType


 Please guide me. Thanks.


 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3772648.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: String search in Dismax handler

2012-02-23 Thread mechravi25
=QParserDisMaxQParser/str 
   null name=altquerystring / 
   null name=boostfuncs / 
 - lst name=timing
   double name=time578.0/double 
 - lst name=prepare
   double name=time1.0/double 
 - lst name=org.apache.solr.handler.component.QueryComponent
   double name=time1.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.FacetComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.MoreLikeThisComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.HighlightComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.StatsComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.DebugComponent
   double name=time0.0/double 
   /lst
   /lst
 - lst name=process
   double name=time577.0/double 
 - lst name=org.apache.solr.handler.component.QueryComponent
   double name=time373.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.FacetComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.MoreLikeThisComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.HighlightComponent
   double name=time136.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.StatsComponent
   double name=time0.0/double 
   /lst
 - lst name=org.apache.solr.handler.component.DebugComponent
   double name=time68.0/double 
   /lst
   /lst
   /lst
   /lst
   /response


we also tried by using the following tag, str name=qftext/str 
to make the dismax handler point to the default field type in the schema.xml 
and this is also not working. 
Am I missing something here? Please guide me

Thanks


--
View this message in context: 
http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3769450.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: String search in Dismax handler

2012-02-23 Thread Erick Erickson
 name=qpass by value/str
  - arr name=facet.field
   strtypeFacet/str
   strrFacet/str
   /arr
   str name=qtdismax/str
   /lst
   /lst
  + result name=response numFound=18 start=0
  + lst name=facet_counts
  + lst name=highlighting
  - lst name=debug
   str name=rawquerystringpass by value/str
   str name=querystringpass by value/str
   str name=parsedquery+DisjunctionMaxQuery((xid:pass by value^0.3 |
 id:pass by value^0.3 | x_name:pass ? value^0.3 | text:pass ? value |
 name:pass ? value^2.3)) ()/str
   str name=parsedquery_toString+(xid:pass by value^0.3 | id:pass by
 value^0.3 | x_name:pass ? value^0.3 | text:pass ? value | name:pass ?
 value^2.3) ()/str
  + lst name=explain
   str name=QParserDisMaxQParser/str
   null name=altquerystring /
   null name=boostfuncs /
  - lst name=timing
   double name=time578.0/double
  - lst name=prepare
   double name=time1.0/double
  - lst name=org.apache.solr.handler.component.QueryComponent
   double name=time1.0/double
   /lst
  - lst name=org.apache.solr.handler.component.FacetComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.MoreLikeThisComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.HighlightComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.StatsComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.DebugComponent
   double name=time0.0/double
   /lst
   /lst
  - lst name=process
   double name=time577.0/double
  - lst name=org.apache.solr.handler.component.QueryComponent
   double name=time373.0/double
   /lst
  - lst name=org.apache.solr.handler.component.FacetComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.MoreLikeThisComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.HighlightComponent
   double name=time136.0/double
   /lst
  - lst name=org.apache.solr.handler.component.StatsComponent
   double name=time0.0/double
   /lst
  - lst name=org.apache.solr.handler.component.DebugComponent
   double name=time68.0/double
   /lst
   /lst
   /lst
   /lst
   /response


 we also tried by using the following tag, str name=qftext/str
 to make the dismax handler point to the default field type in the schema.xml
 and this is also not working.
 Am I missing something here? Please guide me

 Thanks


 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3769450.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: String search in Dismax handler

2012-02-22 Thread Erick Erickson
Two things:
1 what version of Solr are you using? qt=dismax isn't going to any request
handler I don't think.

2 what do you get when you add debugQuery=on? Try that with
both results and perhaps that will shed some light. If not, can you
post the results?

Best
Erick

On Wed, Feb 22, 2012 at 7:47 AM, mechravi25 mechrav...@yahoo.co.in wrote:
 Hi,

 The string I am searching is Pass By Value.  I am using the qt=dismax (in
 the request query) as well.


 When I search the above string with the double quotes, the data is getting
 fetched
 but the same query string without any double quotes gives no results.

 Following is the dismax request handler in the solrconfig.xml


 requestHandler name=dismax class=solr.DisMaxRequestHandler 
    lst name=defaults
     str name=echoParamsexplicit/str

     str name=fl
        id,score
     /str

     str name=q.alt*:*/str


     str name=f.name.hl.fragsize0/str

     str name=f.name.hl.alternateFieldname/str
     str name=f.text.hl.fragmenterregex/str
    /lst
  /requestHandler



 The same query string works fine with and without double quotes when I use
 default request handler


 Following is the default request handler in the solrconfig.xml

 requestHandler name=standard class=solr.StandardRequestHandler
 default=true

     lst name=defaults
       str name=echoParamsexplicit/str

     /lst
  /requestHandler


 Please provide some suggestions as to why the string search without quotes
 is returning no records
 when dismax handler is used. Am I missing out on something?

 Thanks.

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3766360.html
 Sent from the Solr - User mailing list archive at Nabble.com.