Return doc if one or more query keywords occur multiple times

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

Return doc if one or more query keywords occur multiple times

by gistolero :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am using Dismax request handler for queries:

...select?q=foo bar foo2 bar2&qt=dismax&mm=2...

With parameter "mm=2" I configure that at least 2 of the optional clauses must match, regardless of how many clauses there are.

But now I want change this to the following:

List all documents that have at least 2 of the optional clauses OR that have at least one of the query terms (e.g. foo) more than once.

Is this possible?
Thanks,
Gisto

--
DSL-Preisknaller: DSL Komplettpakete von GMX schon für
16,99 Euro mtl.!* Hier klicken: http://portal.gmx.net/de/go/dsl02

Re: Return doc if one or more query keywords occur multiple times

by gistolero :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anyone?

-------- Original-Nachricht --------
> Datum: Thu, 12 Nov 2009 13:29:20 +0100
> Von: gistolero@...
> An: solr-user@...
> Betreff: Return doc if one or more query keywords occur multiple times

> Hello,
>
> I am using Dismax request handler for queries:
>
> ...select?q=foo bar foo2 bar2&qt=dismax&mm=2...
>
> With parameter "mm=2" I configure that at least 2 of the optional clauses
> must match, regardless of how many clauses there are.
>
> But now I want change this to the following:
>
> List all documents that have at least 2 of the optional clauses OR that
> have at least one of the query terms (e.g. foo) more than once.
>
> Is this possible?
> Thanks,
> Gisto
>
> --
> DSL-Preisknaller: DSL Komplettpakete von GMX schon für
> 16,99 Euro mtl.!* Hier klicken: http://portal.gmx.net/de/go/dsl02

--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

Re: Return doc if one or more query keywords occur multiple times

by hossman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

: I am using Dismax request handler for queries:
:
: ...select?q=foo bar foo2 bar2&qt=dismax&mm=2...
        ...
: But now I want change this to the following:
:
: List all documents that have at least 2 of the optional clauses OR that
: have at least one of the query terms (e.g. foo) more than once.

off the top of my head, the easiest way to do something like this is by
duplicating the query string...

        ?q=foo bar foo2 bar2 foo bar foo2 bar2&qt=dismax&mm=2

... it doesn't play nicely with "pf", but you don't seem to be using that.

-Hoss