Re: Strange behavior of edismax and mm=0 with long queries (bug?)

2014-04-06 Thread Nils Kaiser
Actually I found why... I had and as lowercase word in my queries at the
checkbox does not seem to work in the admin UI.
adding lowercaseOperators=false made the queries work.


2014-04-04 18:10 GMT+02:00 Nils Kaiser m...@nils-kaiser.de:

 Hey,

 I am currently using solr to recognize songs and people from a list of
 user comments. My index stores the titles of the songs. At the moment my
 application builds word ngrams and fires a search with that query, which
 works well but is quite inefficient.

 So my thought was to simply use the collated comments as query. So it is a
 case where the query is much longer. I need to use mm=0 or mm=1.

 My plan was to use edismax as the pf2 and pf3 parameters should work well
 for my usecase.

 However when using longer queries, I get a strange behavior which can be
 seen in debugQuery.

 Here is an example:

 Collated Comments (used as query)

 I love Henry so much. It is hard to tear your eyes away from Maria, but
 watch just his feet. You'll be amazed.
 sometimes pure skill can will a comp, sometimes pure joy can win... put
 them both together and there is no competition
 This video clip makes me smile.
 Pure joy!
 so good!
 Who's the person that gave this a thumbs down?!? This is one of the best
 routines I've ever seen. Period. And it's a competitionl! How is that
 possible? They're so good it boggles my mind.
 It's gorgeous. Flawless victory.
 Great number! Does anybody know the name of the piece?
 I believe it's called Sunny side of the street
 Maria is like, the best 'follow' I've ever seen. She's so amazing.
 Thanks so much Johnathan!

 Song name in Index
 Louis Armstrong - Sunny Side of The Street

 parsedquery_toString:
 +(((text:I) (text:love) (text:Henry) (text:so) (text:much.) (text:It)
 (text:is) (text:hard) (text:to) (text:tear) (text:your) (text:eyes)
 (text:away) (text:from) (text:Maria,) (text:but) (text:watch) (text:just)
 (text:his) (text:feet.) (text:You'll) (text:be) (text:amazed.)
 (text:sometimes) (text:pure) (text:skill) (text:can) (text:will) (text:a)
 (text:comp,) (text:sometimes) (text:pure) (text:joy) (text:can)
 (text:win...) (text:put) (text:them) (text:both) +(text:together)
 +(text:there) (text:is) (text:no) (text:competition) (text:This)
 (text:video) (text:clip) (text:makes) (text:me) (text:smile.) (text:Pure)
 (text:joy!) (text:so) (text:good!) (text:Who's) (text:the) (text:person)
 (text:that) (text:gave) (text:this) (text:a) (text:thumbs) (text:down?!?)
 (text:This) (text:is) (text:one) (text:of) (text:the) (text:best)
 (text:routines) (text:I've) (text:ever) (text:seen.) +(text:Period.)
 +(text:it's) (text:a) (text:competitionl!) (text:How) (text:is) (text:that)
 (text:possible?) (text:They're) (text:so) (text:good) (text:it)
 (text:boggles) (text:my) (text:mind.) (text:It's) (text:gorgeous.)
 (text:Flawless) (text:victory.) (text:Great) (text:number!) (text:Does)
 (text:anybody) (text:know) (text:the) (text:name) (text:of) (text:the)
 (text:piece?) (text:I) (text:believe) (text:it's) (text:called)
 (text:Sunny) (text:side) (text:of) (text:the) (text:street) (text:Maria)
 (text:is) (text:like,) (text:the) (text:best) (text:'follow') (text:I've)
 (text:ever) (text:seen.) (text:She's) (text:so) (text:amazing.)
 (text:Thanks) (text:so) (text:much) (text:Johnathan!))~1)/str

 This query generates 0 results. The reason is it expects terms together,
 there, Period., it's to be part of the document (see parsedquery above, all
 other terms are optional, those terms are must).

 Is there any reason for this behavior? If I use shorter queries it works
 flawlessly and returns the document.

 I've appended the whole query.

 Best,

 Nils



Strange behavior of edismax and mm=0 with long queries (bug?)

2014-04-04 Thread Nils Kaiser
Hey,

I am currently using solr to recognize songs and people from a list of user
comments. My index stores the titles of the songs. At the moment my
application builds word ngrams and fires a search with that query, which
works well but is quite inefficient.

So my thought was to simply use the collated comments as query. So it is a
case where the query is much longer. I need to use mm=0 or mm=1.

My plan was to use edismax as the pf2 and pf3 parameters should work well
for my usecase.

However when using longer queries, I get a strange behavior which can be
seen in debugQuery.

Here is an example:

Collated Comments (used as query)

I love Henry so much. It is hard to tear your eyes away from Maria, but
watch just his feet. You'll be amazed.
sometimes pure skill can will a comp, sometimes pure joy can win... put
them both together and there is no competition
This video clip makes me smile.
Pure joy!
so good!
Who's the person that gave this a thumbs down?!? This is one of the best
routines I've ever seen. Period. And it's a competitionl! How is that
possible? They're so good it boggles my mind.
It's gorgeous. Flawless victory.
Great number! Does anybody know the name of the piece?
I believe it's called Sunny side of the street
Maria is like, the best 'follow' I've ever seen. She's so amazing.
Thanks so much Johnathan!

Song name in Index
Louis Armstrong - Sunny Side of The Street

parsedquery_toString:
+(((text:I) (text:love) (text:Henry) (text:so) (text:much.) (text:It)
(text:is) (text:hard) (text:to) (text:tear) (text:your) (text:eyes)
(text:away) (text:from) (text:Maria,) (text:but) (text:watch) (text:just)
(text:his) (text:feet.) (text:You'll) (text:be) (text:amazed.)
(text:sometimes) (text:pure) (text:skill) (text:can) (text:will) (text:a)
(text:comp,) (text:sometimes) (text:pure) (text:joy) (text:can)
(text:win...) (text:put) (text:them) (text:both) +(text:together)
+(text:there) (text:is) (text:no) (text:competition) (text:This)
(text:video) (text:clip) (text:makes) (text:me) (text:smile.) (text:Pure)
(text:joy!) (text:so) (text:good!) (text:Who's) (text:the) (text:person)
(text:that) (text:gave) (text:this) (text:a) (text:thumbs) (text:down?!?)
(text:This) (text:is) (text:one) (text:of) (text:the) (text:best)
(text:routines) (text:I've) (text:ever) (text:seen.) +(text:Period.)
+(text:it's) (text:a) (text:competitionl!) (text:How) (text:is) (text:that)
(text:possible?) (text:They're) (text:so) (text:good) (text:it)
(text:boggles) (text:my) (text:mind.) (text:It's) (text:gorgeous.)
(text:Flawless) (text:victory.) (text:Great) (text:number!) (text:Does)
(text:anybody) (text:know) (text:the) (text:name) (text:of) (text:the)
(text:piece?) (text:I) (text:believe) (text:it's) (text:called)
(text:Sunny) (text:side) (text:of) (text:the) (text:street) (text:Maria)
(text:is) (text:like,) (text:the) (text:best) (text:'follow') (text:I've)
(text:ever) (text:seen.) (text:She's) (text:so) (text:amazing.)
(text:Thanks) (text:so) (text:much) (text:Johnathan!))~1)/str

This query generates 0 results. The reason is it expects terms together,
there, Period., it's to be part of the document (see parsedquery above, all
other terms are optional, those terms are must).

Is there any reason for this behavior? If I use shorter queries it works
flawlessly and returns the document.

I've appended the whole query.

Best,

Nils
?xml version=1.0 encoding=UTF-8?
response

lst name=responseHeader
  int name=status0/int
  int name=QTime11/int
/lst
result name=response numFound=0 start=0
/result
lst name=debug
  str name=rawquerystringI love Henry so much. It is hard to tear your eyes away from Maria, but watch just his feet. You'll be amazed.
sometimes pure skill can will a comp, sometimes pure joy can win... put them both together and there is no competition
This video clip makes me smile.
Pure joy!
so good!
Who's the person that gave this a thumbs down?!? This is one of the best routines I've ever seen. Period. And it's a competitionl! How is that possible? They're so good it boggles my mind.
It's gorgeous. Flawless victory.
Great number! Does anybody know the name of the piece?
I believe it's called Sunny side of the street
Maria is like, the best 'follow' I've ever seen. She's so amazing.
Thanks so much Johnathan!
/str
  str name=querystringI love Henry so much. It is hard to tear your eyes away from Maria, but watch just his feet. You'll be amazed.
sometimes pure skill can will a comp, sometimes pure joy can win... put them both together and there is no competition
This video clip makes me smile.
Pure joy!
so good!
Who's the person that gave this a thumbs down?!? This is one of the best routines I've ever seen. Period. And it's a competitionl! How is that possible? They're so good it boggles my mind.
It's gorgeous. Flawless victory.
Great number! Does anybody know the name of the piece?
I believe it's called Sunny side of the street
Maria is like, the best 'follow' I've ever seen. She's so amazing.
Thanks so much Johnathan!

Problems with EDisMax field aliases for multiple fields on Solr 3.6.1

2012-08-08 Thread Nils Kaiser

Hey,

I'm trying to use field aliases that reference multiple fields on Solr 
3.6.1 (1362471) as stated in the EDisMax documentation 
(http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming).


If I use an alias for a single field, everything is fine, but once I use 
an alias with more than one field (using syntax 
f.who.qf=name^5.0,namealias^2.0 as in the docs), the alias stops working.


Examples
(base url is 
http://localhost:8982/solr/select?debugQuery=truefq=type%3AUserq=name%3Amaierfl=*+scoredefType=edismaxrows=10 
+ params below, debug shows how f.name.qf is displayed in debug xml view)


1) f.name.qf=last_name_text
- returns 39 results, debug: str name=f.name.qflast_name_text/str

2) f.name.qf=last_name_text,first_name_text
- returns 0 results, debug: str 
name=f.name.qflast_name_text,first_name_text/str


3) f.name.qf=last_name_text%2Cfirst_name_text
- returns 0 results, debug: str 
name=f.name.qflast_name_text,first_name_text/str


4) f.name.qf=first_name_textf.name.qf=last_name_text
- returns 0 results, debug: arr 
name=f.name.qfstrfirst_name_text/strstrlast_name_text/str/arr


5) f.name.qf=last_name_textf.name.qf=first_name_text
- returns 39 results, debug: arr 
name=f.name.qfstrlast_name_text/strstrfirst_name_text/str/arr


6) f.name.qf=last_name_text^2.0,first_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
2.0,first_name_text


7) f.name.qf=last_name_text^2.0%2Cfirst_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
2.0,first_name_text


Comments:

1) works as expected, but uses only one field for the alias
2) does not work, but this format is explained in the docs if I 
understood it right

3) tried this to try escaping issues, but xml shows the same value
4) does not work, because SOLR seems to take first value only
5) does work, but only because SOLR takes first value (see 4)
6), 7) lead to http error, but format is same as in docs??

Any ideas whether I am doing something wrong here, or the docs are 
misleading, or there is a bug in the SOLR version I use?


Best,

Nils


Re: Problems with EDisMax field aliases for multiple fields on Solr 3.6.1

2012-08-08 Thread Nils Kaiser
Thanks for the quick replies. Jack was right, I switched to space as 
separator and it works.


2) f.name.qf=last_name_text,first_name_text
- returns 0 results, debug shows str 
name=f.name.qflast_name_text,first_name_text/str

+DisjunctionMaxQuery((last_name_text,first_name_text:maier))

8) f.name.qf=last_name_text first_name_text
- returns 39 results, debug shows str name=f.name.qflast_name_text 
first_name_text/str

+DisjunctionMaxQuery((last_name_text:maier | first_name_text:maier))

So the docs are wrong as the example uses a comma. Should I raise a JIRA 
issue for that?


Thanks Jan for the hint regarding parsedquery, I'll make sure to include 
it in my reports next time.


Best,

Nils

Am 08.08.2012 15:06, schrieb Jack Krupansky:
Jan, I did notice that you used a space rather than a comma in the 
alias field list. The wiki does indicate comma (which is what Nils 
used), but... who knows. I haven't checked the code yet.


-- Jack Krupansky

-Original Message- From: Jan Høydahl
Sent: Wednesday, August 08, 2012 9:03 AM
To: solr-user@lucene.apache.org
Subject: Re: Problems with EDisMax field aliases for multiple fields 
on Solr 3.6.1


Hi,

It's hard to see what's going on without knowing more about your 
schema and documents. Also, it would be more helpful if you could 
paste the parsedquery part of the DebugQuery, where you actually see 
how the query was interpreted. Your query syntax looks correct, and I 
just verified that the feature works on a clean 3.6.1.


I indexed all xml's in example/exampledocs, then ran this query:

http://localhost:8983/solr/select?debugQuery=trueq=foo:drivefl=*%20scoredefType=edismaxf.foo.qf=name^1%20features^2 



Here's what my debug looks like:
str name=querystringfoo:drive/str
str name=parsedquery+DisjunctionMaxQuery((features:drive^2.0 | 
name:drive))/str


You see that the query string is being parsed correctly, and we get 
three hits (vs 2 in name and 1 in features alone).


--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

8. aug. 2012 kl. 13:41 skrev Nils Kaiser m...@nils-kaiser.de:


Hey,

I'm trying to use field aliases that reference multiple fields on 
Solr 3.6.1 (1362471) as stated in the EDisMax documentation 
(http://wiki.apache.org/solr/ExtendedDisMax#Field_aliasing_.2BAC8_renaming).


If I use an alias for a single field, everything is fine, but once I 
use an alias with more than one field (using syntax 
f.who.qf=name^5.0,namealias^2.0 as in the docs), the alias stops 
working.


Examples
(base url is 
http://localhost:8982/solr/select?debugQuery=truefq=type%3AUserq=name%3Amaierfl=*+scoredefType=edismaxrows=10 
+ params below, debug shows how f.name.qf is displayed in debug xml 
view)


1) f.name.qf=last_name_text
- returns 39 results, debug: str name=f.name.qflast_name_text/str

2) f.name.qf=last_name_text,first_name_text
- returns 0 results, debug: str 
name=f.name.qflast_name_text,first_name_text/str


3) f.name.qf=last_name_text%2Cfirst_name_text
- returns 0 results, debug: str 
name=f.name.qflast_name_text,first_name_text/str


4) f.name.qf=first_name_textf.name.qf=last_name_text
- returns 0 results, debug: arr 
name=f.name.qfstrfirst_name_text/strstrlast_name_text/str/arr


5) f.name.qf=last_name_textf.name.qf=first_name_text
- returns 39 results, debug: arr 
name=f.name.qfstrlast_name_text/strstrfirst_name_text/str/arr


6) f.name.qf=last_name_text^2.0,first_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
2.0,first_name_text


7) f.name.qf=last_name_text^2.0%2Cfirst_name_text^2.0
- http error 500, java.lang.NumberFormatException: For input string: 
2.0,first_name_text


Comments:

1) works as expected, but uses only one field for the alias
2) does not work, but this format is explained in the docs if I 
understood it right

3) tried this to try escaping issues, but xml shows the same value
4) does not work, because SOLR seems to take first value only
5) does work, but only because SOLR takes first value (see 4)
6), 7) lead to http error, but format is same as in docs??

Any ideas whether I am doing something wrong here, or the docs are 
misleading, or there is a bug in the SOLR version I use?


Best,

Nils 





--
Nils Kaiser
MSc in Information Systems