Dismax and boolean match

View: New views
5 Messages — Rating Filter:   Alert me  

Dismax and boolean match

by ram_sj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have three fields, business_name, category_name, sub_category_name in my solrconfig file.

my query = "pet clinic"

example sub_category_names: Veterinarians, Kennels, Veterinary Clinics   Hospitals, Pet Grooming, Pet Stores, Clinics

my ideal requirement is dismax searching on

a. dismax over three or two fields
b. followed by a Boolean match over any one of the field is acceptable.

I played around with minimum match attributes, but doesn't seems to be helpful, I guess the dismax requires at-least two fields.

The nest queries takes only one qf filed, so it doesn't help much either.

Any suggestions will be helpful.

Thanks
Ram

Re: Dismax and Standard Queries together

by Alexey-34 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ram,

You can add another field total ( catchall field ) and copy all other
fields into this field ( using copyField directive )
http://wiki.apache.org/solr/SchemaXml#Copy_Fields

and use this field in DisMax qf parameter, for example
qf=business_name^2.0 category_name^1.0 sub_category_name^1.0 total^0.0
and
mm=100%

Thus, it requires occurrence of all search keywords in any field of
your document, but you can control relevance of returned results via
boosting in qf parameter.

HIH,
Alex

On Tue, Nov 3, 2009 at 12:02 AM, ram_sj <rpachaiyappan@...> wrote:

>
> Hi,
>
> I have three fields, business_name, category_name, sub_category_name in my
> solrconfig file.
>
> my query = "pet clinic"
>
> example sub_category_names: Veterinarians, Kennels, Veterinary Clinics
> Hospitals, Pet Grooming, Pet Stores, Clinics
>
> my ideal requirement is dismax searching on
>
> a. dismax over three or two fields
> b. followed by a Boolean match over any one of the field is acceptable.
>
> I played around with minimum match attributes, but doesn't seems to be
> helpful, I guess the dismax requires at-least two fields.
>
> The nest queries takes only one qf filed, so it doesn't help much either.
>
> Any suggestions will be helpful.
>
> Thanks
> Ram
> --
> View this message in context: http://old.nabble.com/Dismax-and-Standard-Queries-together-tp26157830p26157830.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: Dismax and Standard Queries together

by ram_sj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alex,

Thanks for the suggestions and It looks promising. I tried to have copy field attributed it worked really close to standard query handler for certain types of query.

e.g: q=pet+clinic , where my category has both the words pets and clinic.

But I tried for some other queries,

e.g: q=moving+companies,

sub_category:movers.

The standard query handler (searches only for business name) did a good job for this query, then dismax.

[Note: I have stemming issues for this query in solr, because, it reduce the word moving=>move, movers=>mover]

The way we expected that it should match either compani or move is not happening.

Thanks again for your great tip.

Ram


Alexey-34 wrote:
Hi Ram,

You can add another field total ( catchall field ) and copy all other
fields into this field ( using copyField directive )
http://wiki.apache.org/solr/SchemaXml#Copy_Fields

and use this field in DisMax qf parameter, for example
qf=business_name^2.0 category_name^1.0 sub_category_name^1.0 total^0.0
and
mm=100%

Thus, it requires occurrence of all search keywords in any field of
your document, but you can control relevance of returned results via
boosting in qf parameter.

HIH,
Alex

On Tue, Nov 3, 2009 at 12:02 AM, ram_sj <rpachaiyappan@gmail.com> wrote:
>
> Hi,
>
> I have three fields, business_name, category_name, sub_category_name in my
> solrconfig file.
>
> my query = "pet clinic"
>
> example sub_category_names: Veterinarians, Kennels, Veterinary Clinics
> Hospitals, Pet Grooming, Pet Stores, Clinics
>
> my ideal requirement is dismax searching on
>
> a. dismax over three or two fields
> b. followed by a Boolean match over any one of the field is acceptable.
>
> I played around with minimum match attributes, but doesn't seems to be
> helpful, I guess the dismax requires at-least two fields.
>
> The nest queries takes only one qf filed, so it doesn't help much either.
>
> Any suggestions will be helpful.
>
> Thanks
> Ram
> --
> View this message in context: http://old.nabble.com/Dismax-and-Standard-Queries-together-tp26157830p26157830.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: Dismax and Standard Queries together

by Nestor Oviedo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all. I have a little different problem, under the same subject.
I have a federated search engine installed called Pazpar2
(http://www.indexdata.com/pazpar2) and I need to query my solr index
from it . So, I've installed the SolrSRUServer (written in perl) wich
receives the pazpar2 requests, parses it into lucene syntax and sends
it to the solr server.
The problem arises when I try to make an advanced search from Pazpar2,
because the SolrSRUServer parses the query and then Solr receives
"select?q=field:value", wich makes the dismax query parser treat it as
a simple search.
I know the right way to do this is sending the fq param, but to do
that I'd have to edit the SolrSRUServer. This has at least to main
problems:
- I don't know Perl.
- The SolrSRUServer will get too coupled to the dismax query parser:
if I want to use the standard query parser again, instead of using the
"field:value" syntax, it would use the fq param and (correct me if I'm
wrong) this would affect the performance in the search.

So, the question is: Is there any way for the dismax request handler
to do a field search without the fq param (actually, without the
addition of another param to the request) ??

Tanks in advance.
Regards.
Nestor



On Thu, Nov 5, 2009 at 2:51 PM, ram_sj <rpachaiyappan@...> wrote:

>
> Hi Alex,
>
> Thanks for the suggestions and It looks promising. I tried to have copy
> field attributed it worked really close to standard query handler for
> certain types of query.
>
> e.g: q=pet+clinic , where my category has both the words pets and clinic.
>
> But I tried for some other queries,
>
> e.g: q=moving+companies,
>
> sub_category:movers.
>
> The standard query handler (searches only for business name) did a good job
> for this query, then dismax.
>
> [Note: I have stemming issues for this query in solr, because, it reduce the
> word moving=>move, movers=>mover]
>
> The way we expected that it should match either compani or move is not
> happening.
>
> Thanks again for your great tip.
>
> Ram
>
>
>
> Alexey-34 wrote:
>>
>> Hi Ram,
>>
>> You can add another field total ( catchall field ) and copy all other
>> fields into this field ( using copyField directive )
>> http://wiki.apache.org/solr/SchemaXml#Copy_Fields
>>
>> and use this field in DisMax qf parameter, for example
>> qf=business_name^2.0 category_name^1.0 sub_category_name^1.0 total^0.0
>> and
>> mm=100%
>>
>> Thus, it requires occurrence of all search keywords in any field of
>> your document, but you can control relevance of returned results via
>> boosting in qf parameter.
>>
>> HIH,
>> Alex
>>
>> On Tue, Nov 3, 2009 at 12:02 AM, ram_sj <rpachaiyappan@...> wrote:
>>>
>>> Hi,
>>>
>>> I have three fields, business_name, category_name, sub_category_name in
>>> my
>>> solrconfig file.
>>>
>>> my query = "pet clinic"
>>>
>>> example sub_category_names: Veterinarians, Kennels, Veterinary Clinics
>>> Hospitals, Pet Grooming, Pet Stores, Clinics
>>>
>>> my ideal requirement is dismax searching on
>>>
>>> a. dismax over three or two fields
>>> b. followed by a Boolean match over any one of the field is acceptable.
>>>
>>> I played around with minimum match attributes, but doesn't seems to be
>>> helpful, I guess the dismax requires at-least two fields.
>>>
>>> The nest queries takes only one qf filed, so it doesn't help much either.
>>>
>>> Any suggestions will be helpful.
>>>
>>> Thanks
>>> Ram
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Dismax-and-Standard-Queries-together-tp26157830p26157830.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Dismax-and-boolean-match-tp26157830p26216577.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: Dismax and Standard Queries together

by Alexey-34 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The way we expected that it should match either compani or move is not
> happening.
Pay attention to mm parameter
http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29
"The default value is 100% (all clauses must match)"
You can change it to "1" ( at least 1 word must much ) or "50%"

Alex

On Thu, Nov 5, 2009 at 8:51 PM, ram_sj <rpachaiyappan@...> wrote:

>
> Hi Alex,
>
> Thanks for the suggestions and It looks promising. I tried to have copy
> field attributed it worked really close to standard query handler for
> certain types of query.
>
> e.g: q=pet+clinic , where my category has both the words pets and clinic.
>
> But I tried for some other queries,
>
> e.g: q=moving+companies,
>
> sub_category:movers.
>
> The standard query handler (searches only for business name) did a good job
> for this query, then dismax.
>
> [Note: I have stemming issues for this query in solr, because, it reduce the
> word moving=>move, movers=>mover]
>
> The way we expected that it should match either compani or move is not
> happening.
>
> Thanks again for your great tip.
>
> Ram
>
>
>
> Alexey-34 wrote:
>>
>> Hi Ram,
>>
>> You can add another field total ( catchall field ) and copy all other
>> fields into this field ( using copyField directive )
>> http://wiki.apache.org/solr/SchemaXml#Copy_Fields
>>
>> and use this field in DisMax qf parameter, for example
>> qf=business_name^2.0 category_name^1.0 sub_category_name^1.0 total^0.0
>> and
>> mm=100%
>>
>> Thus, it requires occurrence of all search keywords in any field of
>> your document, but you can control relevance of returned results via
>> boosting in qf parameter.
>>
>> HIH,
>> Alex
>>
>> On Tue, Nov 3, 2009 at 12:02 AM, ram_sj <rpachaiyappan@...> wrote:
>>>
>>> Hi,
>>>
>>> I have three fields, business_name, category_name, sub_category_name in
>>> my
>>> solrconfig file.
>>>
>>> my query = "pet clinic"
>>>
>>> example sub_category_names: Veterinarians, Kennels, Veterinary Clinics
>>> Hospitals, Pet Grooming, Pet Stores, Clinics
>>>
>>> my ideal requirement is dismax searching on
>>>
>>> a. dismax over three or two fields
>>> b. followed by a Boolean match over any one of the field is acceptable.
>>>
>>> I played around with minimum match attributes, but doesn't seems to be
>>> helpful, I guess the dismax requires at-least two fields.
>>>
>>> The nest queries takes only one qf filed, so it doesn't help much either.
>>>
>>> Any suggestions will be helpful.
>>>
>>> Thanks
>>> Ram
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Dismax-and-Standard-Queries-together-tp26157830p26157830.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Dismax-and-boolean-match-tp26157830p26216577.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>