You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by anuvenk <an...@hotmail.com> on 2009/06/01 21:23:29 UTC

Dismax handler phrase matching question

Hello,

   I'm using the dismax handler for the phrase matching. I have a few legal
resources in my index in the following format for example

title                      state         

dui faq1               california               
dui faq2               florida
dui faq3               federal

Now I want to be able to return federal results irrespective of the state.
For example dui california should return all federal results for 'dui' also
along with california results. i was thinking of a synonym mapping for the
states like 'state name' => 'federal' 
(i.e california,federal
florida, federal
maine, federal
etc
)
Is there a better way though?
-- 
View this message in context: http://www.nabble.com/Dismax-handler-phrase-matching-question-tp23820340p23820340.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Dismax handler phrase matching question

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Jun 3, 2009 at 1:59 AM, anuvenk <an...@hotmail.com> wrote:

>
> I have to search over multiple fields so passing everything in the 'q'
> might
> not be neat. Can something be done with the facet.query to accomplish this.
> I'm using the facet parameters. I'm not familiar with java so not sure if a
> function query could be used to accomplish this. Any other thoughts?
>
>
I don't think facet.query and function queries have anything to do with
this. Using the dismax params seem to be the right way.

-- 
Regards,
Shalin Shekhar Mangar.

Re: Dismax handler phrase matching question

Posted by anuvenk <an...@hotmail.com>.
I have to search over multiple fields so passing everything in the 'q' might
not be neat. Can something be done with the facet.query to accomplish this.
I'm using the facet parameters. I'm not familiar with java so not sure if a
function query could be used to accomplish this. Any other thoughts?


Shalin Shekhar Mangar wrote:
> 
> On Tue, Jun 2, 2009 at 12:53 AM, anuvenk <an...@hotmail.com> wrote:
> 
>>
>> title                      state
>>
>> dui faq1               california
>> dui faq2               florida
>> dui faq3               federal
>>
>> Now I want to be able to return federal results irrespective of the
>> state.
>> For example dui california should return all federal results for 'dui'
>> also
>> along with california results.
>>
> 
> Perhaps you just need to create your query in such a way that both match?
> 
> q=title:(dui california) state:(dui california) state:federal
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://www.nabble.com/Dismax-handler-phrase-matching-question-tp23820340p23840154.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Dismax handler phrase matching question

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Jun 2, 2009 at 12:53 AM, anuvenk <an...@hotmail.com> wrote:

>
> title                      state
>
> dui faq1               california
> dui faq2               florida
> dui faq3               federal
>
> Now I want to be able to return federal results irrespective of the state.
> For example dui california should return all federal results for 'dui' also
> along with california results.
>

Perhaps you just need to create your query in such a way that both match?

q=title:(dui california) state:(dui california) state:federal

-- 
Regards,
Shalin Shekhar Mangar.