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 Kiwi de coder <ki...@gmail.com> on 2011/12/23 05:14:41 UTC

about partial index update

hi all,

I have a object like this

public class Link {
  private long id;
  private string url;
  // other 20 property
  private int vote; //summary of vote, for sorting used
}

so when I index document, my Lucene document also contain all field from my
Link object. e.g

doc_id = 1
url = "solr.org
vote = 23

because the vote is change frequently then other property, every time the
vote is increase, I need to reindex the whole document so I can use vote
field for sorting.

is that anyway just to index partial Lucene document (in this case, only
vote field) instead of index again whole document ? any performance concern
if is index whole doc (I think is not look like a good solution).

any idea ?

kiwi

Re: about partial index update

Posted by Ahmet Arslan <io...@yahoo.com>.
> if in this case, then i think reindex the whole document
> probably will be
> easily right ? as compare to write to text file (look like
> more work and
> probably performance same ? )

I don't think dumping id,vote pairs to a text file is more work than indexing whole document that has more than 20 fields.

Re: about partial index update

Posted by Kiwi de coder <ki...@gmail.com>.
hi,

if in this case, then i think reindex the whole document probably will be
easily right ? as compare to write to text file (look like more work and
probably performance same ? )

actually i was looking for a features like indextank which can update
dynamic value without scarify performance.

http://www.quora.com/Indextank-Vs-Websolr
<http://www.quora.com/Indextank-Vs-Websolr>

reddit is one of the users of indextank.

so i wondering solr got any features like this ? (since like only indextank
had this base on my research.)

regards,
kiwi


On Fri, Dec 23, 2011 at 11:10 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > In my case, my vote will keep update in database, but the
> > ExternalFileField
> > since like the value will get from a file.
> >
> > so if I using  ExternalFileField, is that anyway to
> > read the value from
> > index actually ?
>
> You could read values from DB and dump them into a text file in a periodic
> manner.
>
> Not used by myself but you can find this post relevant.
>
>
> http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.html
>

Re: about partial index update

Posted by Ahmet Arslan <io...@yahoo.com>.
> In my case, my vote will keep update in database, but the
> ExternalFileField
> since like the value will get from a file.
> 
> so if I using  ExternalFileField, is that anyway to
> read the value from
> index actually ?

You could read values from DB and dump them into a text file in a periodic manner. 

Not used by myself but you can find this post relevant. 

http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.html

Re: about partial index update

Posted by Kiwi de coder <ki...@gmail.com>.
hi, thx for reply !

In my case, my vote will keep update in database, but the ExternalFileField
since like the value will get from a file.

so if I using  ExternalFileField, is that anyway to read the value from
index actually ?

regards,
kiwi

On Fri, Dec 23, 2011 at 10:41 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > if i using ExternalFileField, i cannot do sorting when
> > query.
>
> Sort by function query is now doable.
> http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function
>

Re: about partial index update

Posted by Ahmet Arslan <io...@yahoo.com>.
> if i using ExternalFileField, i cannot do sorting when
> query.

Sort by function query is now doable. 
http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function

Re: about partial index update

Posted by Kiwi de coder <ki...@gmail.com>.
hi,

if i using ExternalFileField, i cannot do sorting when query.

regards,
kiwi

On Fri, Dec 23, 2011 at 6:33 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > I have a object like this
> >
> > public class Link {
> >   private long id;
> >   private string url;
> >   // other 20 property
> >   private int vote; //summary of vote, for sorting
> > used
> > }
> >
> > so when I index document, my Lucene document also contain
> > all field from my
> > Link object. e.g
> >
> > doc_id = 1
> > url = "solr.org
> > vote = 23
> >
> > because the vote is change frequently then other property,
> > every time the
> > vote is increase, I need to reindex the whole document so I
> > can use vote
> > field for sorting.
> >
> > is that anyway just to index partial Lucene document (in
> > this case, only
> > vote field) instead of index again whole document ? any
> > performance concern
> > if is index whole doc (I think is not look like a good
> > solution).
> >
> > any idea ?
>
> Looks like you are looking for ExternalFileField.
>
>
> http://lucene.apache.org/solr/api/org/apache/solr/schema/ExternalFileField.html
>

Re: about partial index update

Posted by Ahmet Arslan <io...@yahoo.com>.
> I have a object like this
> 
> public class Link {
>   private long id;
>   private string url;
>   // other 20 property
>   private int vote; //summary of vote, for sorting
> used
> }
> 
> so when I index document, my Lucene document also contain
> all field from my
> Link object. e.g
> 
> doc_id = 1
> url = "solr.org
> vote = 23
> 
> because the vote is change frequently then other property,
> every time the
> vote is increase, I need to reindex the whole document so I
> can use vote
> field for sorting.
> 
> is that anyway just to index partial Lucene document (in
> this case, only
> vote field) instead of index again whole document ? any
> performance concern
> if is index whole doc (I think is not look like a good
> solution).
> 
> any idea ?

Looks like you are looking for ExternalFileField.

http://lucene.apache.org/solr/api/org/apache/solr/schema/ExternalFileField.html