|
List Info
Thread: RE: Forced Top Document
|
|
| RE: Forced Top Document |
  United States |
2007-10-24 12:56:37 |
Yes, this will only work if the results are sorted by score
(the
default).
One thing I thought of after I sent this out was that this
will include
the specified document even if it doesn't match your search
criteria,
which may not be what you want.
-----Original Message-----
From: mark angelillo [mailto:lists snooth.com]
Sent: Wednesday, October 24, 2007 12:44 PM
To: solr-user lucene.apache.org
Subject: Re: Forced Top Document
Charlie,
That's interesting. I did try something like this. Did you
try your
query with a sorting parameter?
What I've read suggests that all the results are returned
based on
the query specified, but then resorted as specified.
Boosting (which
modifies the document's score) should not change the order
unless the
results are sorted by score.
Mark
On Oct 24, 2007, at 1:05 PM, Charlie Jackson wrote:
> Do you know which document you want at the top? If so,
I believe you
> could just add an "OR" clause to your query
to boost that document
> very
> high, such as
>
> ?q=foo OR id:bar^1000
>
> Tried this on my installation and it did, indeed push
the document
> specified to the top.
>
>
>
> -----Original Message-----
> From: Matthew Runo [mailto:mruno zappos.com]
> Sent: Wednesday, October 24, 2007 10:17 AM
> To: solr-user lucene.apache.org
> Subject: Re: Forced Top Document
>
> I'd love to know this, as I just got a development
request for this
> very feature. I'd rather not spend time on it if it
already exists.
>
>
+--------------------------------------------------------+
> | Matthew Runo
> | Zappos Development
> | mruno zappos.com
> | 702-943-7833
>
+--------------------------------------------------------+
>
>
> On Oct 23, 2007, at 10:12 PM, mark angelillo wrote:
>
>> Hi all,
>>
>> Is there a way to get a specific document to appear
on top of
>> search results even if a sorting parameter would
push it further
>> down?
>>
>> Thanks in advance,
>> Mark
>>
>> mark angelillo
>> snooth inc.
>> o: 646.723.4328
>> c: 484.437.9915
>> mark snooth.com
>> snooth -- 1.8 million ratings and counting...
>>
>>
>
mark angelillo
snooth inc.
o: 646.723.4328
c: 484.437.9915
mark snooth.com
snooth -- 1.8 million ratings and counting...
|
|
| RE: Forced Top Document |

|
2007-10-24 13:18:48 |
I'm going to be doing something similar, and I don't think
I'll be
sorting by score (although, that might be feasible). In my
use-case
though, we don't want to include something unless it is
already matched
by our filters. I'll probably end up just making two search
hits, but
it would be nice if solr could handle it for us.
> -----Original Message-----
> From: Charlie Jackson [mailto:Charlie.Jackson cision.com]
> Sent: Wednesday, October 24, 2007 10:57 AM
> To: solr-user lucene.apache.org
> Subject: RE: Forced Top Document
>
> Yes, this will only work if the results are sorted by
score
> (the default).
>
> One thing I thought of after I sent this out was that
this
> will include the specified document even if it doesn't
match
> your search criteria, which may not be what you want.
>
>
> -----Original Message-----
> From: mark angelillo [mailto:lists snooth.com]
> Sent: Wednesday, October 24, 2007 12:44 PM
> To: solr-user lucene.apache.org
> Subject: Re: Forced Top Document
>
> Charlie,
>
> That's interesting. I did try something like this. Did
you
> try your query with a sorting parameter?
>
> What I've read suggests that all the results are
returned
> based on the query specified, but then resorted as
specified.
> Boosting (which modifies the document's score) should
not
> change the order unless the results are sorted by
score.
>
> Mark
>
> On Oct 24, 2007, at 1:05 PM, Charlie Jackson wrote:
>
> > Do you know which document you want at the top? If
so, I
> believe you
> > could just add an "OR" clause to your
query to boost that document
> > very high, such as
> >
> > ?q=foo OR id:bar^1000
> >
> > Tried this on my installation and it did, indeed
push the document
> > specified to the top.
> >
> >
> >
> > -----Original Message-----
> > From: Matthew Runo [mailto:mruno zappos.com]
> > Sent: Wednesday, October 24, 2007 10:17 AM
> > To: solr-user lucene.apache.org
> > Subject: Re: Forced Top Document
> >
> > I'd love to know this, as I just got a development
request for this
> > very feature. I'd rather not spend time on it if
it already exists.
> >
> >
+--------------------------------------------------------+
> > | Matthew Runo
> > | Zappos Development
> > | mruno zappos.com
> > | 702-943-7833
> >
+--------------------------------------------------------+
> >
> >
> > On Oct 23, 2007, at 10:12 PM, mark angelillo
wrote:
> >
> >> Hi all,
> >>
> >> Is there a way to get a specific document to
appear on top
> of search
> >> results even if a sorting parameter would push
it further down?
> >>
> >> Thanks in advance,
> >> Mark
> >>
> >> mark angelillo
> >> snooth inc.
> >> o: 646.723.4328
> >> c: 484.437.9915
> >> mark snooth.com
> >> snooth -- 1.8 million ratings and counting...
> >>
> >>
> >
>
> mark angelillo
> snooth inc.
> o: 646.723.4328
> c: 484.437.9915
> mark snooth.com
> snooth -- 1.8 million ratings and counting...
>
>
|
|
| Re: Forced Top Document |

|
2007-10-24 13:30:36 |
This method Charlie suggested will work just fine with a
minor tweak.
For relevancy sorting
?q=foo OR (foo AND id:bar)
For nonrelevancy sorting, all you need is a multilevel sort.
Just add
a bogus field that only the important document contains.
Then sort by
bogus field in descending order before any other sorting
criteria are
applied.
Either way, the document only appears when it matches the
search
criteria, and it will always be on top.
kyle
On 10/24/07, Charlie Jackson <Charlie.Jackson cision.com> wrote:
> Yes, this will only work if the results are sorted by
score (the
> default).
>
> One thing I thought of after I sent this out was that
this will include
> the specified document even if it doesn't match your
search criteria,
> which may not be what you want.
>
>
> -----Original Message-----
> From: mark angelillo [mailto:lists snooth.com]
> Sent: Wednesday, October 24, 2007 12:44 PM
> To: solr-user lucene.apache.org
> Subject: Re: Forced Top Document
>
> Charlie,
>
> That's interesting. I did try something like this. Did
you try your
> query with a sorting parameter?
>
> What I've read suggests that all the results are
returned based on
> the query specified, but then resorted as specified.
Boosting (which
> modifies the document's score) should not change the
order unless the
> results are sorted by score.
>
> Mark
>
> On Oct 24, 2007, at 1:05 PM, Charlie Jackson wrote:
>
> > Do you know which document you want at the top? If
so, I believe you
> > could just add an "OR" clause to your
query to boost that document
> > very
> > high, such as
> >
> > ?q=foo OR id:bar^1000
> >
> > Tried this on my installation and it did, indeed
push the document
> > specified to the top.
> >
> >
> >
> > -----Original Message-----
> > From: Matthew Runo [mailto:mruno zappos.com]
> > Sent: Wednesday, October 24, 2007 10:17 AM
> > To: solr-user lucene.apache.org
> > Subject: Re: Forced Top Document
> >
> > I'd love to know this, as I just got a development
request for this
> > very feature. I'd rather not spend time on it if
it already exists.
> >
> >
+--------------------------------------------------------+
> > | Matthew Runo
> > | Zappos Development
> > | mruno zappos.com
> > | 702-943-7833
> >
+--------------------------------------------------------+
> >
> >
> > On Oct 23, 2007, at 10:12 PM, mark angelillo
wrote:
> >
> >> Hi all,
> >>
> >> Is there a way to get a specific document to
appear on top of
> >> search results even if a sorting parameter
would push it further
> >> down?
> >>
> >> Thanks in advance,
> >> Mark
> >>
> >> mark angelillo
> >> snooth inc.
> >> o: 646.723.4328
> >> c: 484.437.9915
> >> mark snooth.com
> >> snooth -- 1.8 million ratings and counting...
> >>
> >>
> >
>
> mark angelillo
> snooth inc.
> o: 646.723.4328
> c: 484.437.9915
> mark snooth.com
> snooth -- 1.8 million ratings and counting...
>
>
>
--
----------------------------------------------------------
Kyle Banerjee
Digital Services Program Manager
Orbis Cascade Alliance
banerjek uoregon.edu / 541.359.9599
|
|
| Re: Forced Top Document |
  Canada |
2007-10-24 13:32:00 |
On 24-Oct-07, at 10:56 AM, Charlie Jackson wrote:
> Yes, this will only work if the results are sorted by
score (the
> default).
>
> One thing I thought of after I sent this out was that
this will
> include
> the specified document even if it doesn't match your
search criteria,
> which may not be what you want.
If you use dismax, you can add the boost to the 'bq'
parameter to
affect scoring only (will not match the doc if it wouldn't
have been
matched anyway).
-Mike
|
|
[1-4]
|
|