Re: Solr edismax always using the default fields?

2015-07-07 Thread Paden
Thank you! Thank you, thank you, thank you. That worked and it brought the
right results. Thanks. It was driving me crazy. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204p4216228.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr edismax always using the default fields?

2015-07-07 Thread Chris Hostetter

Forgot the relevent documentation...

https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser
https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser



: Date: Tue, 7 Jul 2015 13:57:25 -0700 (MST)
: From: Chris Hostetter 
: To: solr-user@lucene.apache.org
: Subject: Re: Solr edismax always using the default fields?
: 
: 
: according to hte echParams output, you aren't specifying a "q" param.
: 
: You seem to be trying to specify your query input using the "q.alt" param 
: -- but the q.alt param doesn't use the edismax parser specified by the 
: defType param -- q.alt is a feature *of* the edismax parser that is used 
: to completley override all of the options used to configure edismax when 
: there is no "q" param, and it (by default) uses the defualt solr parser.
: 
: (the intended usecase is along the lines of "if the user doesn't specify a 
: query string, default to a search for all the books for sale via 
: 'q.alt=inStock:true'")
: 
: stop configuring a q.alt that matches you authors name, and instead 
: specify a default "q" param (or enture your client always sends a "q" 
: param) and see if that solves things for you.
: 
: 
: : Date: Tue, 7 Jul 2015 10:55:24 -0700 (MST)
: : From: Paden 
: : Reply-To: solr-user@lucene.apache.org
: : To: solr-user@lucene.apache.org
: : Subject: Solr edismax always using the default fields?
: : 
: : Hello, 
: : 
: : I'm trying to tune a search handler to get the results that I want. In the
: : solrconfig.xml I specify several different query fields for the edismax
: : query parser but it always seems to use the default fields instead.
: : 
: : For example and clarification, when I remove Author from the "df" list of
: : fields the search results do not come up with the author I was looking for.
: : But when I add Author back in as a "df" it returns 19/20 of his documents as
: : the top search results. I guess I'm really confused because when you specify
: : the query fields solr shouldn't use those default fields. I guess it's not a
: : real super problem because I can define all the fields I need as defaults.
: : I'm just trying to figure out where I'm going wrong here. Is there a reason
: : that this would happen? I have the search handler xml below
: : 
: :  
: : 
: :  
: :all 
: :edismax
: :Author  <--ADDING THIS GIVES DESIRED RESULT,
: : REMOVING BAD--
: :text   -RESULT. NOTHING ELSE CHANGES
: :text^0.5 Title^1.2 Author^2.0
: :20
: :*some author name*
: :  
: : 
: : 
: : 
: : And here is the echoed params of the search
: : 
: :  "responseHeader": {
: : "status": 0,
: : "QTime": 48,
: : "params": {
: :   "lowercaseOperators": "true",
: :   "df": [
: : "Author",
: : "text"
: :   ],
: :   "echoParams": "all",
: :   "indent": "true",
: :   "qf": "text^0.5 Title^1.2 Author^2.0",
: :   "_": "1436291181730",
: :   "q.alt": "*some author name*",
: :   "stopwords": "true",
: :   "wt": "json",
: :   "defType": "edismax",
: :   "rows": "20"
: : }
: : 
: : 
: : 
: : --
: : View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204.html
: : Sent from the Solr - User mailing list archive at Nabble.com.
: : 
: 
: -Hoss
: http://www.lucidworks.com/
: 

-Hoss
http://www.lucidworks.com/


Re: Solr edismax always using the default fields?

2015-07-07 Thread Chris Hostetter

according to hte echParams output, you aren't specifying a "q" param.

You seem to be trying to specify your query input using the "q.alt" param 
-- but the q.alt param doesn't use the edismax parser specified by the 
defType param -- q.alt is a feature *of* the edismax parser that is used 
to completley override all of the options used to configure edismax when 
there is no "q" param, and it (by default) uses the defualt solr parser.

(the intended usecase is along the lines of "if the user doesn't specify a 
query string, default to a search for all the books for sale via 
'q.alt=inStock:true'")

stop configuring a q.alt that matches you authors name, and instead 
specify a default "q" param (or enture your client always sends a "q" 
param) and see if that solves things for you.


: Date: Tue, 7 Jul 2015 10:55:24 -0700 (MST)
: From: Paden 
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Solr edismax always using the default fields?
: 
: Hello, 
: 
: I'm trying to tune a search handler to get the results that I want. In the
: solrconfig.xml I specify several different query fields for the edismax
: query parser but it always seems to use the default fields instead.
: 
: For example and clarification, when I remove Author from the "df" list of
: fields the search results do not come up with the author I was looking for.
: But when I add Author back in as a "df" it returns 19/20 of his documents as
: the top search results. I guess I'm really confused because when you specify
: the query fields solr shouldn't use those default fields. I guess it's not a
: real super problem because I can define all the fields I need as defaults.
: I'm just trying to figure out where I'm going wrong here. Is there a reason
: that this would happen? I have the search handler xml below
: 
:  
: 
:  
:all 
:edismax
:Author  <--ADDING THIS GIVES DESIRED RESULT,
: REMOVING BAD--
:text   -RESULT. NOTHING ELSE CHANGES
:text^0.5 Title^1.2 Author^2.0
:20
:*some author name*
:  
: 
: 
: 
: And here is the echoed params of the search
: 
:  "responseHeader": {
: "status": 0,
: "QTime": 48,
: "params": {
:   "lowercaseOperators": "true",
:   "df": [
: "Author",
: "text"
:   ],
:   "echoParams": "all",
:   "indent": "true",
:   "qf": "text^0.5 Title^1.2 Author^2.0",
:   "_": "1436291181730",
:   "q.alt": "*some author name*",
:   "stopwords": "true",
:   "wt": "json",
:   "defType": "edismax",
:   "rows": "20"
: }
: 
: 
: 
: --
: View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204.html
: Sent from the Solr - User mailing list archive at Nabble.com.
: 

-Hoss
http://www.lucidworks.com/


Re: Solr edismax always using the default fields?

2015-07-07 Thread Paden
It just defaults to text anyway. I remove it entirely from the solrconfig and
never specify it in the solr query portion but it still defaults to text
anyway.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204p4216224.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr edismax always using the default fields?

2015-07-07 Thread Upayavira
What happens if you don't specify the df?

On Tue, Jul 7, 2015, at 08:36 PM, Paden wrote:
> Well I've just been using an authors name. Last Name, First Name Middle
> Initial. Like *Snowman, Frosty T.*
> 
> As for the debugging I'm not really seeing anything that would help me
> understand why the query fields aren't kicking in. And instead only the
> default fields are.
> 
> I do see that is parsing the name as a text field though
> 
>  "org.apache.lucene.search.BooleanClause:text:*+lastname,",
>   "org.apache.lucene.search.BooleanClause:+text:firstname",
>   "org.apache.lucene.search.BooleanClause:+text:middleinitial*
> 
> But I already knew it was parsing it as text. I just don't understand why
> it's going to the default field when other fields have been specified
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204p4216211.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr edismax always using the default fields?

2015-07-07 Thread Paden
Well I've just been using an authors name. Last Name, First Name Middle
Initial. Like *Snowman, Frosty T.*

As for the debugging I'm not really seeing anything that would help me
understand why the query fields aren't kicking in. And instead only the
default fields are.

I do see that is parsing the name as a text field though

 "org.apache.lucene.search.BooleanClause:text:*+lastname,",
  "org.apache.lucene.search.BooleanClause:+text:firstname",
  "org.apache.lucene.search.BooleanClause:+text:middleinitial*

But I already knew it was parsing it as text. I just don't understand why
it's going to the default field when other fields have been specified



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204p4216211.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr edismax always using the default fields?

2015-07-07 Thread Upayavira
What is your query?

Note that edismax uses the Lucene query parser by default, and dismax if
it encounters an error.

Add debugQuery=true to your query, and look at the parsed query output
to see what your query has been parsed into. This can often be very
illuminating as you will see which fields are used and when.

Upayavira

On Tue, Jul 7, 2015, at 06:55 PM, Paden wrote:
> Hello, 
> 
> I'm trying to tune a search handler to get the results that I want. In
> the
> solrconfig.xml I specify several different query fields for the edismax
> query parser but it always seems to use the default fields instead.
> 
> For example and clarification, when I remove Author from the "df" list of
> fields the search results do not come up with the author I was looking
> for.
> But when I add Author back in as a "df" it returns 19/20 of his documents
> as
> the top search results. I guess I'm really confused because when you
> specify
> the query fields solr shouldn't use those default fields. I guess it's
> not a
> real super problem because I can define all the fields I need as
> defaults.
> I'm just trying to figure out where I'm going wrong here. Is there a
> reason
> that this would happen? I have the search handler xml below
> 
>  
> 
>  
>all 
>edismax
>Author  <--ADDING THIS GIVES DESIRED
>RESULT,
> REMOVING BAD--
>text   -RESULT. NOTHING ELSE CHANGES
>text^0.5 Title^1.2 Author^2.0
>20
>*some author name*
>  
> 
> 
> 
> And here is the echoed params of the search
> 
>  "responseHeader": {
> "status": 0,
> "QTime": 48,
> "params": {
>   "lowercaseOperators": "true",
>   "df": [
> "Author",
> "text"
>   ],
>   "echoParams": "all",
>   "indent": "true",
>   "qf": "text^0.5 Title^1.2 Author^2.0",
>   "_": "1436291181730",
>   "q.alt": "*some author name*",
>   "stopwords": "true",
>   "wt": "json",
>   "defType": "edismax",
>   "rows": "20"
> }
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204.html
> Sent from the Solr - User mailing list archive at Nabble.com.