Re: Highlighting does not work when using !boost as a nested query

2011-05-19 Thread Juan Antonio Farré Basurte
By the way, I was wrong when saying that using bf instead of !boost did not 
work either. I probably hit more than one problem at the same time when I first 
tested that.
I've retested now and this works:

/select?q=+id:12345^0.01 +_query_:"{!dismax 
v=$qq}"&bf=recip(ms(NOW/DAY,published_date),3.16e-11,1,1)&qq=user_text&qf=text1^2
 text2&pf=text1^2 text2&tie=0.1&q.alt=*:*&hl=true&hl.fl=text1 
text2&hl.mergeContiguous=true

But I don't get the multiplicative boost I'd like to use...

El 19/05/2011, a las 11:31, Juan Antonio Farré Basurte escribió:

> Hi,
> 
> The query is generated dynamically and can be more or less complex depending 
> on different parameters. I'm also not free to give many details of our 
> implementation, but I'll give you the minimal query string that fails and the 
> relevant pieces of the config.
> The query string is:
> 
> /select?q=+id:12345^0.01 +_query_:"{!boost b=$dateboost v=$qq 
> deftype=dismax}"&dateboost=recip(ms(NOW/DAY,published_date),3.16e-11,1,1)&qq=user_text&qf=text1^2
>  text2&pf=text1^2 text2&tie=0.1&q.alt=*:*&hl=true&hl.fl=text1 
> text2&hl.mergeContiguous=true
> 
> where id is an int and text1 and text2 are type text. hl.fl has proven to be 
> necessary whenever I use dismax in an inner query. Ohterwise, only text2 (the 
> default field) is highlighted, and not both fields appearing in qf. For 
> example,
> q={!dismax v=$qq}&... does not require hl.fl to highlight both text1 and 
> text2.
> q=+_query_:"{!dismax v=$qq}"&... only highlights text2, unless I specify 
> hl.fl.
> 
> The given query is probably not minimal in the sense that some of the 
> dismax-related parameters can be omitted and the query still fails. But the 
> one given always fails (and adding more complexity to it does not make it 
> work, quite obviously). Unfortunately, hl.requireFieldMatch=false does not 
> help.
> 
> Request handler config is the following:
> 
> 
>   
> explicit
>   
> 
> 
> Highlighter config is the following:
> 
> 
>default="true">
> 
>   100
> 
>   
>   
> 
>   70
>   0.5
>   [-\w ,/\n\"']{20,200}
> 
>   
>default="true">
> 
>   
>   
> 
>   
> 
> 
> If there's any other information that could be useful, just ask.
> Thank you very much for your help,
> 
> Juan
> 
> El 16/05/2011, a las 23:18, Chris Hostetter escribió:
> 
>> 
>> : As I said in my previous message, if I issue:
>> : q=+field1:range +field2:value +_query_:{!dismax v=$qq}
>> : highlighting works. I've just discovered the problem is not just with 
>> {!boost...}. If I just add a bf parameter to the previous query, 
>> highlighting also fails.
>> : Anybody knows what can be happening? I'm really stuck on this problem...
>> 
>> Just a hunch, but i suspect the problem has to do with 
>> highlighter (or maybe it's the fragment generator?) trying to determine
>> matches from query types it doens't understand 
>> 
>> I thought there was a query param you could use to tell the highlighter to 
>> use an "alternate" query string (that would be simpler) instead of the 
>> real query ... but i'm not seeing it in the docs.
>> 
>> hl.requireFieldMatch=false might also help (not sure)
>> 
>> In general it would probably be helpful for folks if you could post the 
>> *entire* request you are making (full query string and all request params) 
>> along with the solrconfig.xml sections that show how your request handler 
>> and highlighter are configured.
>> 
>> 
>> 
>> -Hoss
> 



Re: Highlighting does not work when using !boost as a nested query

2011-05-19 Thread Juan Antonio Farré Basurte
Hi,

The query is generated dynamically and can be more or less complex depending on 
different parameters. I'm also not free to give many details of our 
implementation, but I'll give you the minimal query string that fails and the 
relevant pieces of the config.
The query string is:

/select?q=+id:12345^0.01 +_query_:"{!boost b=$dateboost v=$qq 
deftype=dismax}"&dateboost=recip(ms(NOW/DAY,published_date),3.16e-11,1,1)&qq=user_text&qf=text1^2
 text2&pf=text1^2 text2&tie=0.1&q.alt=*:*&hl=true&hl.fl=text1 
text2&hl.mergeContiguous=true

where id is an int and text1 and text2 are type text. hl.fl has proven to be 
necessary whenever I use dismax in an inner query. Ohterwise, only text2 (the 
default field) is highlighted, and not both fields appearing in qf. For example,
q={!dismax v=$qq}&... does not require hl.fl to highlight both text1 and 
text2.
q=+_query_:"{!dismax v=$qq}"&... only highlights text2, unless I specify 
hl.fl.

The given query is probably not minimal in the sense that some of the 
dismax-related parameters can be omitted and the query still fails. But the one 
given always fails (and adding more complexity to it does not make it work, 
quite obviously). Unfortunately, hl.requireFieldMatch=false does not help.

Request handler config is the following:


  
explicit
  


Highlighter config is the following:


  

  100

  
  

  70
  0.5
  [-\w ,/\n\"']{20,200}

  
  

  
  

  


If there's any other information that could be useful, just ask.
Thank you very much for your help,

Juan

El 16/05/2011, a las 23:18, Chris Hostetter escribió:

> 
> : As I said in my previous message, if I issue:
> : q=+field1:range +field2:value +_query_:{!dismax v=$qq}
> : highlighting works. I've just discovered the problem is not just with 
> {!boost...}. If I just add a bf parameter to the previous query, highlighting 
> also fails.
> : Anybody knows what can be happening? I'm really stuck on this problem...
> 
> Just a hunch, but i suspect the problem has to do with 
> highlighter (or maybe it's the fragment generator?) trying to determine
> matches from query types it doens't understand 
> 
> I thought there was a query param you could use to tell the highlighter to 
> use an "alternate" query string (that would be simpler) instead of the 
> real query ... but i'm not seeing it in the docs.
> 
> hl.requireFieldMatch=false might also help (not sure)
> 
> In general it would probably be helpful for folks if you could post the 
> *entire* request you are making (full query string and all request params) 
> along with the solrconfig.xml sections that show how your request handler 
> and highlighter are configured.
> 
> 
> 
> -Hoss



Re: Highlighting does not work when using !boost as a nested query

2011-05-16 Thread Chris Hostetter

: As I said in my previous message, if I issue:
: q=+field1:range +field2:value +_query_:{!dismax v=$qq}
: highlighting works. I've just discovered the problem is not just with 
{!boost...}. If I just add a bf parameter to the previous query, highlighting 
also fails.
: Anybody knows what can be happening? I'm really stuck on this problem...

Just a hunch, but i suspect the problem has to do with 
highlighter (or maybe it's the fragment generator?) trying to determine
matches from query types it doens't understand 

I thought there was a query param you could use to tell the highlighter to 
use an "alternate" query string (that would be simpler) instead of the 
real query ... but i'm not seeing it in the docs.

hl.requireFieldMatch=false might also help (not sure)

In general it would probably be helpful for folks if you could post the 
*entire* request you are making (full query string and all request params) 
along with the solrconfig.xml sections that show how your request handler 
and highlighter are configured.



-Hoss


Highlighting does not work when using !boost as a nested query

2011-05-08 Thread Juan Antonio Farré Basurte
Hi,

I need to boost newer documents in my dismax queries.
As I've been able to read in the wiki, it's best to use a multiplicative
boost. The only way I know to do this with the dismax (not edismax)
query parser is via a {!boost b=$dateboost v=$qq defType=dismax} query.
To make things more complicated, I also need to add some filters to the
query (by date range, by field value...) that don't fit as filters, as
they have a huge number of possible unique values.
Hence, I added them to the main query in a form such:

q=+field1:range +field2:value +_query_:{!boost b=$dateboost v=$qq
defType=dismax}

And then I add hl=true as a top-level parameter.
The result is that the response includes some empty values in the
highlighting list and nothing else:














Using just q={!boost b=$dateboost v=$qq defType=dismax} works well.
Using something like:

q=+field1:range +field2:value +_query_:{!dismax v=$qq}

also works.

But when I try to use dismax inside boost inside a nested query,
highlighting stops working.

Am I doing anyhing wrong? Do you know any workaround? Should I post a
bug anywhere?
Is there another way of specifying a multiplicative boost (without using
edismax)?

Thanks,

Juan