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 Listas Discussões <li...@arianpasquali.com> on 2012/02/03 12:39:10 UTC
Solr index update approach
hi,
I have an opinion mining application running solr that serves to retrieve
documents and perform some analytics using facet queries.
It works great. But I have a big issue.
The document has an attribute for opinion that is automatically detected,
but users can change it if it´s not correct.
A document may be shared by some users and each user can change the opinion
of the document.
And the opinion may be different for each user.
Opinion value is crucial here because its the main facet field on the
analytic view.
The thing is that solr does not handle doc updates, right now I need to
delete it first and recreate the whole doc index to change it with the new
metadata.
And of course this is not fast enough. So I´m probably doing this the wrong
way.
Seams to me that is not a good approach and I should not update the index
this way. The index should be more static, otherwise I will be reindexing
the whole index to often.
I´m running solr with a master/slave topology (2 slaves replication). The
master to write and the slaves to read.
Solr index is feed by a PostgresSQL database.
I was wondering about using a nosql keyvalue database to store this kind of
metadata and keep the index untouchable.
So this way I could keep the index intact and store the user´s custom data
there.
It would fit if this value was not used by facet queries. That´s the
problem.
So my question is, what would be the best approach to handle this kind of
use case with solr?
If is not a usual use case, consider for example favorite docs.
Favorites docs is probably a common use case in information retrieval.
How do you handle for example favorite docs between users?
I´d be very interested to hear about the best approach here.
best
Arian
Re: Solr index update approach
Posted by Ahmet Arslan <io...@yahoo.com>.
> external fields was one of the options, but I was not 100%
> sure if it would
> fit.
> I will study more about this option.
I was wondering if Lucene's ToChildBlockJoinQuery and/or ToParentBlockJoinQuery can be replacement for ExternalFileField.
http://www.searchworkings.org/blog/-/blogs/tochildblockjoinquery-in-lucene
Also what are the similarities and differences from solr's join QueryParser
http://wiki.apache.org/solr/Join
Re: Solr index update approach
Posted by Listas Discussões <li...@arianpasquali.com>.
hi Mikhail
external fields was one of the options, but I was not 100% sure if it would
fit.
I will study more about this option.
thank you so much for your reply
Arian
2012/2/3 Mikhail Khludnev <mk...@griddynamics.com>
> Hello Arian,
>
> Pls look into
>
> http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.htmlit
> can be useful for your purpose. If you need to count facets against an
> external field you need to develop your own component - shouldn't be a big
> deal.
> Solr's bolts are
>
> http://lucidworks.lucidimagination.com/display/solr/Solr+Field+Types#SolrFieldTypes-WorkingwithExternalFiles
> http://wiki.apache.org/solr/FunctionQuery
>
> http://www.lucidimagination.com/blog/2009/07/06/ranges-over-functions-in-solr-14/
>
> Regards
>
> On Fri, Feb 3, 2012 at 3:39 PM, Listas Discussões
> <li...@arianpasquali.com>wrote:
>
> > hi,
> > I have an opinion mining application running solr that serves to retrieve
> > documents and perform some analytics using facet queries.
> > It works great. But I have a big issue.
> > The document has an attribute for opinion that is automatically detected,
> > but users can change it if it´s not correct.
> >
> > A document may be shared by some users and each user can change the
> opinion
> > of the document.
> > And the opinion may be different for each user.
> > Opinion value is crucial here because its the main facet field on the
> > analytic view.
> >
> > The thing is that solr does not handle doc updates, right now I need to
> > delete it first and recreate the whole doc index to change it with the
> new
> > metadata.
> > And of course this is not fast enough. So I´m probably doing this the
> wrong
> > way.
> > Seams to me that is not a good approach and I should not update the index
> > this way. The index should be more static, otherwise I will be reindexing
> > the whole index to often.
> >
> > I´m running solr with a master/slave topology (2 slaves replication). The
> > master to write and the slaves to read.
> > Solr index is feed by a PostgresSQL database.
> >
> > I was wondering about using a nosql keyvalue database to store this kind
> of
> > metadata and keep the index untouchable.
> > So this way I could keep the index intact and store the user´s custom
> data
> > there.
> >
> > It would fit if this value was not used by facet queries. That´s the
> > problem.
> >
> > So my question is, what would be the best approach to handle this kind of
> > use case with solr?
> > If is not a usual use case, consider for example favorite docs.
> > Favorites docs is probably a common use case in information retrieval.
> > How do you handle for example favorite docs between users?
> >
> > I´d be very interested to hear about the best approach here.
> >
> > best
> > Arian
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Lucid Certified
> Apache Lucene/Solr Developer
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>
--
Arian Pasquali
FEUP researcher
twitter: @arianpasquali
www.arianpasquali.com
Re: Solr index update approach
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Arian,
Pls look into
http://sujitpal.blogspot.com/2011/05/custom-sorting-in-solr-using-external.htmlit
can be useful for your purpose. If you need to count facets against an
external field you need to develop your own component - shouldn't be a big
deal.
Solr's bolts are
http://lucidworks.lucidimagination.com/display/solr/Solr+Field+Types#SolrFieldTypes-WorkingwithExternalFiles
http://wiki.apache.org/solr/FunctionQuery
http://www.lucidimagination.com/blog/2009/07/06/ranges-over-functions-in-solr-14/
Regards
On Fri, Feb 3, 2012 at 3:39 PM, Listas Discussões
<li...@arianpasquali.com>wrote:
> hi,
> I have an opinion mining application running solr that serves to retrieve
> documents and perform some analytics using facet queries.
> It works great. But I have a big issue.
> The document has an attribute for opinion that is automatically detected,
> but users can change it if it´s not correct.
>
> A document may be shared by some users and each user can change the opinion
> of the document.
> And the opinion may be different for each user.
> Opinion value is crucial here because its the main facet field on the
> analytic view.
>
> The thing is that solr does not handle doc updates, right now I need to
> delete it first and recreate the whole doc index to change it with the new
> metadata.
> And of course this is not fast enough. So I´m probably doing this the wrong
> way.
> Seams to me that is not a good approach and I should not update the index
> this way. The index should be more static, otherwise I will be reindexing
> the whole index to often.
>
> I´m running solr with a master/slave topology (2 slaves replication). The
> master to write and the slaves to read.
> Solr index is feed by a PostgresSQL database.
>
> I was wondering about using a nosql keyvalue database to store this kind of
> metadata and keep the index untouchable.
> So this way I could keep the index intact and store the user´s custom data
> there.
>
> It would fit if this value was not used by facet queries. That´s the
> problem.
>
> So my question is, what would be the best approach to handle this kind of
> use case with solr?
> If is not a usual use case, consider for example favorite docs.
> Favorites docs is probably a common use case in information retrieval.
> How do you handle for example favorite docs between users?
>
> I´d be very interested to hear about the best approach here.
>
> best
> Arian
>
--
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>