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 Mark Phillips <MP...@library.unt.edu> on 2007/01/30 18:57:37 UTC

DisMax and truncation

We are looking at using solr's DisMax handler for our implementation on
our digital collections at UNT, and I had a quick question about it. 

Is there a way to do truncation with DisMax?

Just being able to search for (photo*) would be helpful in quite a few
places. 

So far I am really liking how the dismax allows us to give priority to
specific fields in our collection. 

Thanks


Mark

Re: DisMax and truncation

Posted by Chris Hostetter <ho...@fucit.org>.
: A more dismaxy way might be to specify the structure of the query in a
: different param rather than in the query string.  haven't thought it
: through though...

it depends on the goal ... i was interpreting the question as "i want my
users to be able to type in prefix/wildcard expressions and have them
applied across many fields using various boosts wrapped in a
DisjuntionMaxQuery" ... but yeah, the spirt of the DisMaxRequestHandler
isn't specific to building a DisjuntionMaxQuery -- it's having the info
about the query structure seperate from the raw user input.  right now
most of thatstructure is in code with params to let you hook in and
specify parts of that structure -- lettig you change the structure itself
is a pretty cool idea ... but i'm having trouble pictureing what it would
look like.


-Hoss


Re: DisMax and truncation

Posted by Yonik Seeley <yo...@apache.org>.
On 1/30/07, Chris Hostetter <ho...@fucit.org> wrote:
>
> : Is there a way to do truncation with DisMax?
> :
> : Just being able to search for (photo*) would be helpful in quite a few
> : places.
>
> I'm afraid i'm not understanding your question ... what do you mean by
> "truncation" ? ... your example:  (photo*) seems to be asking about
> a prefix or wildcard type search, which might match photomat,
> photographer, photoaaaaaaaaaaa, etc... is that what you're asking about?
>
> there is no way at the moment to do prefix or wildcard searches ... but
> off the top of my head i think it might be fairly easy - there is a
> partical escaping that happens to escape all QueryParser meta characters
> except + and - .. we could probably make that configurable so "*" was left
> alone as well. ... i think there would need to be some additions to the
> DisjunctionMaxQueryParser to loop over the aliased fields too though.

A more dismaxy way might be to specify the structure of the query in a
different param rather than in the query string.  haven't thought it
through though...

-Yonik

Re: DisMax and truncation

Posted by Mark Phillips <MP...@library.unt.edu>.

>>> Chris Hostetter <ho...@fucit.org> 1/30/2007 12:45 PM >>>

: Is there a way to do truncation with DisMax?
:
: Just being able to search for (photo*) would be helpful in quite a
few
: places.

: I'm afraid i'm not understanding your question ... what do you mean
by
: "truncation" ? ... your example:  (photo*) seems to be asking about
: a prefix or wildcard type search, which might match photomat,
: photographer, photoaaaaaaaaaaa, etc... is that what you're asking
about?

: there is no way at the moment to do prefix or wildcard searches ...
but
: off the top of my head i think it might be fairly easy - there is a
: partical escaping that happens to escape all QueryParser meta
characters
: except + and - .. we could probably make that configurable so "*" was
left
: alone as well. ... i think there would need to be some additions to
the
: DisjunctionMaxQueryParser to loop over the aliased fields too
though.

This is exactly what I am thinking about,  I used the wrong term, I was
thinking wildcard and wrote truncation... doah. 



-Hoss


Re: DisMax and truncation

Posted by Chris Hostetter <ho...@fucit.org>.
: Is there a way to do truncation with DisMax?
:
: Just being able to search for (photo*) would be helpful in quite a few
: places.

I'm afraid i'm not understanding your question ... what do you mean by
"truncation" ? ... your example:  (photo*) seems to be asking about
a prefix or wildcard type search, which might match photomat,
photographer, photoaaaaaaaaaaa, etc... is that what you're asking about?

there is no way at the moment to do prefix or wildcard searches ... but
off the top of my head i think it might be fairly easy - there is a
partical escaping that happens to escape all QueryParser meta characters
except + and - .. we could probably make that configurable so "*" was left
alone as well. ... i think there would need to be some additions to the
DisjunctionMaxQueryParser to loop over the aliased fields too though.



-Hoss