Update doc boost and field boost w/o reposting?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Update doc boost and field boost w/o reposting?

Jack L
I understand that I'm supposed to delete the old record and
re-post in order to update a document. But in many cases,
it takes time to extract data (from a database, etc.) and all
I want to change is the document boost. I wonder if it's possible
to adjust the document boost without deleting and re-posting
a whole document?

--
Best regards,
Jack

Reply | Threaded
Open this post in threaded view
|

Re: Update doc boost and field boost w/o reposting?

Ryan McKinley
Lucene does not have any way to modify existing fields, so solr can't
do it either...  (document boosts are stored as part of the field)

In http://issues.apache.org/jira/browse/SOLR-139, I'm working on a
convenience function to let the client modify an existing solr
document - the one catch is that all fields must be stored so they can
be extracted and re-indexed on the server side.  This may not help
your performance concern, but it may be easier to deal with.

ryan


On 3/31/07, Jack L <[hidden email]> wrote:

> I understand that I'm supposed to delete the old record and
> re-post in order to update a document. But in many cases,
> it takes time to extract data (from a database, etc.) and all
> I want to change is the document boost. I wonder if it's possible
> to adjust the document boost without deleting and re-posting
> a whole document?
>
> --
> Best regards,
> Jack
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Update doc boost and field boost w/o reposting?

Chris Hostetter-3

: Lucene does not have any way to modify existing fields, so solr can't
: do it either...  (document boosts are stored as part of the field)

Actually, this question crossess over into a special case area.  While you
certianly can't "update" a Lucene doc, you can modify the fieldNorm of any
[doc,field] pair using IndexReder.setNorm.  So if you used
TermFreqVectors (to see how many terms oare in the field), you could
update the norm of a field using a new boost.

changing just hte field boost or just the doc boost would be impossible
(because no record is kept of what those independent values were) but
changing just the total boost for some fields would be possible.




-Hoss

Reply | Threaded
Open this post in threaded view
|

Re[2]: Update doc boost and field boost w/o reposting?

Jack L
In reply to this post by Ryan McKinley
Hello Ryan,

Interesting. So it's solr only and does not require new Lucene
functionality? I think storing the fields that may change in
the future is ok.

--
Best regards,
Jack

Saturday, March 31, 2007, 5:50:20 PM, you wrote:

> Lucene does not have any way to modify existing fields, so solr can't
> do it either...  (document boosts are stored as part of the field)

> In http://issues.apache.org/jira/browse/SOLR-139, I'm working on a
> convenience function to let the client modify an existing solr
> document - the one catch is that all fields must be stored so they can
> be extracted and re-indexed on the server side.  This may not help
> your performance concern, but it may be easier to deal with.

> ryan


> On 3/31/07, Jack L <[hidden email]> wrote:
>> I understand that I'm supposed to delete the old record and
>> re-post in order to update a document. But in many cases,
>> it takes time to extract data (from a database, etc.) and all
>> I want to change is the document boost. I wonder if it's possible
>> to adjust the document boost without deleting and re-posting
>> a whole document?
>>
>> --
>> Best regards,
>> Jack
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: Update doc boost and field boost w/o reposting?

Ryan McKinley
Yes, it is only solr - and will have a normal HTTP interface, no lucene.

But as i said, the catch is that *all* fields must be stored, not only
the ones you want to change.  Solr will pull the document out of the
index, modify it and put it back - it can only pull out stored fields
so you must store everything...



On 4/1/07, Jack L <[hidden email]> wrote:

> Hello Ryan,
>
> Interesting. So it's solr only and does not require new Lucene
> functionality? I think storing the fields that may change in
> the future is ok.
>
> --
> Best regards,
> Jack
>
> Saturday, March 31, 2007, 5:50:20 PM, you wrote:
>
> > Lucene does not have any way to modify existing fields, so solr can't
> > do it either...  (document boosts are stored as part of the field)
>
> > In http://issues.apache.org/jira/browse/SOLR-139, I'm working on a
> > convenience function to let the client modify an existing solr
> > document - the one catch is that all fields must be stored so they can
> > be extracted and re-indexed on the server side.  This may not help
> > your performance concern, but it may be easier to deal with.
>
> > ryan
>
>
> > On 3/31/07, Jack L <[hidden email]> wrote:
> >> I understand that I'm supposed to delete the old record and
> >> re-post in order to update a document. But in many cases,
> >> it takes time to extract data (from a database, etc.) and all
> >> I want to change is the document boost. I wonder if it's possible
> >> to adjust the document boost without deleting and re-posting
> >> a whole document?
> >>
> >> --
> >> Best regards,
> >> Jack
> >>
> >>
>
>