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 jchen2000 <jc...@yahoo.com> on 2012/11/01 19:16:19 UTC

Re: need help on solr search

Seems like phrase query is close, but not exactly what we needed. Here is an
example assuming just one field:
the doc: a1 a2 a3 b1 b2 c1 c2 c3 c4 d1 d2
the query: a1 a2* a3 a4* b1 b2* c2 d1* d2

both doc and query terms are ordered. We know that a term should never go
match with b or c terms. Obviously, if we treat all query terms with OR, we
could have the job done, but in a much slower way (also the returned list
would be too long). So the question is, do we have a way to speed this query
up? or customization code is needed (and how)?

Thanks,
Jeremy



--
View this message in context: http://lucene.472066.n3.nabble.com/need-help-on-solr-search-tp4017191p4017630.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: need help on solr search

Posted by jchen2000 <jc...@yahoo.com>.
Used mm parameter and it works!

Right now preparing perf test. Please share if anybody has method to
optimize dismax queries

Thanks!

Jeremy


Otis Gospodnetic-5 wrote
> Hi,
> 
> Have a look at your solrconfig.xml and look for your default operator.
> Also
> look at the docs for the mm parameter on the Wiki. Let us know if that
> does
> it for you.





--
View this message in context: http://lucene.472066.n3.nabble.com/need-help-on-solr-search-tp4017191p4018397.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: need help on solr search

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Have a look at your solrconfig.xml and look for your default operator. Also
look at the docs for the mm parameter on the Wiki. Let us know if that does
it for you.

Otis
--
Performance Monitoring - http://sematext.com/spm
On Nov 1, 2012 5:11 PM, "jchen2000" <jc...@yahoo.com> wrote:

> Otis Gospodnetic-5 wrote
> > You want "ordered term matching" (like in a phrase), but you cannot use
> > AND
> > because you do not want all query terms to be required.  Correct?
>
> That's exactly right! actually none of the query term is required, but we
> need to base similarity score on how many terms are matched. In addtion,
> since we have unique prefixes like "a", "b", "c", we guarantee a1 would
> never match anything in group "b" or "c", etc.
>
>
> Otis Gospodnetic-5 wrote
> > If so, would "a1 a2* a3 a4* b1 b2* c2 d1* d2"~someBigSlop work?
>
> This does not work, because a2* (just any term different from a2, not
> wildcard), a4* etc do not appear in the doc. quoted proximity match seems
> still to require all query terms to appear.
>
> Thanks,
> Jeremy
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/need-help-on-solr-search-tp4017191p4017686.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: need help on solr search

Posted by jchen2000 <jc...@yahoo.com>.
Otis Gospodnetic-5 wrote
> You want "ordered term matching" (like in a phrase), but you cannot use
> AND
> because you do not want all query terms to be required.  Correct?

That's exactly right! actually none of the query term is required, but we
need to base similarity score on how many terms are matched. In addtion,
since we have unique prefixes like "a", "b", "c", we guarantee a1 would
never match anything in group "b" or "c", etc.


Otis Gospodnetic-5 wrote
> If so, would "a1 a2* a3 a4* b1 b2* c2 d1* d2"~someBigSlop work?

This does not work, because a2* (just any term different from a2, not
wildcard), a4* etc do not appear in the doc. quoted proximity match seems
still to require all query terms to appear.

Thanks,
Jeremy





--
View this message in context: http://lucene.472066.n3.nabble.com/need-help-on-solr-search-tp4017191p4017686.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: need help on solr search

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

I don't follow. :(  See inline.

On Thu, Nov 1, 2012 at 2:16 PM, jchen2000 <jc...@yahoo.com> wrote:

> Seems like phrase query is close, but not exactly what we needed. Here is
> an
> example assuming just one field:
> the doc: a1 a2 a3 b1 b2 c1 c2 c3 c4 d1 d2
> the query: a1 a2* a3 a4* b1 b2* c2 d1* d2
>

Are those *s wildcards? Are they relevant here?  If not, remove them to
keep your example as simple as possible.

both doc and query terms are ordered. We know that a term should never go
> match with b or c terms. Obviously, if we treat all query terms with OR, we
>

What does "should never go match with b or c terms" mean?  I see b1, b2*,
c2 in there. There are no b or c terms anywhere in example doc or querym
just b1, b2*, c2.


> could have the job done, but in a much slower way (also the returned list
> would be too long). So the question is, do we have a way to speed this
> query
> up? or customization code is needed (and how)?
>

Is that query supposed to match that doc?
Ah, I think I see what you are trying to do/say.

You want "ordered term matching" (like in a phrase), but you cannot use AND
because you do not want all query terms to be required.  Correct?

If so, would "a1 a2* a3 a4* b1 b2* c2 d1* d2"~someBigSlop work?

I'm not sure if that would be faster than the OR query, but see if that
even does what you are after.

Otis
--
Search Analytics - http://sematext.com/search-analytics/index.html
Performance Monitoring - http://sematext.com/spm/index.html