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 soodyogesh <so...@gmail.com> on 2014/02/06 16:47:24 UTC

Intercept updates and cascade loading of Index.

I would like to know is there a way to intercept or callback whenever new
documents get added to Collection

My use case is I would have one Collection split across shards and whenever
new document arrives in Collection I would like to get callback with
document itself so that I can take some of the field from document being
added and pass it on to other COllection.

Kind of cascading addition , reason being we would like to create
lightweight index(2-3 fields) for autosuggest which is only used for
autosuggest  and replicated across all webservers where our app is running

and for search we would direct to other collection as our search is not as
latency sensitive as our autosuggest.

any pointer would be helpful.



--
View this message in context: http://lucene.472066.n3.nabble.com/Intercept-updates-and-cascade-loading-of-Index-tp4115833.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Intercept updates and cascade loading of Index.

Posted by soodyogesh <so...@gmail.com>.
Thanks for insights. This helps indeed, however im not sure how do i get
delta on commit. I guess I need to do some custom query  to get what has
changed since last update or sort of like that.

I would experiment around that, if anyone does that please share.






--
View this message in context: http://lucene.472066.n3.nabble.com/Intercept-updates-and-cascade-loading-of-Index-tp4115833p4116010.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Intercept updates and cascade loading of Index.

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
You could probably use a commit hook script (in solrconfig.xml) and
then pull the relevant documents/fields (if they are stored) into the
other instances either with DIH (
http://wiki.apache.org/solr/DataImportHandler#SolrEntityProcessor ) or
just as a triggered import.

Otherwise, you may have the documents showing up in the secondary
index before they become visible in the first.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Fri, Feb 7, 2014 at 9:00 AM, soodyogesh <so...@gmail.com> wrote:
> Thanks for reply
>
> Does that mean I need to compile SOLR with my custom request processor ? or
> there is way to extend existing framework and plugin new implementation
>
> Thanks.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Intercept-updates-and-cascade-loading-of-Index-tp4115833p4115951.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Intercept updates and cascade loading of Index.

Posted by soodyogesh <so...@gmail.com>.
Thanks for reply

Does that mean I need to compile SOLR with my custom request processor ? or
there is way to extend existing framework and plugin new implementation 

Thanks.



--
View this message in context: http://lucene.472066.n3.nabble.com/Intercept-updates-and-cascade-loading-of-Index-tp4115833p4115951.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Intercept updates and cascade loading of Index.

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
There is no callback in Solr. You can either have your indexer
application provide a call back or you can write a custom
UpdateRequestProcessor which can extract the relevant fields into a
new document and use SolrJ to write it to another collection.

On Thu, Feb 6, 2014 at 9:17 PM, soodyogesh <so...@gmail.com> wrote:
> I would like to know is there a way to intercept or callback whenever new
> documents get added to Collection
>
> My use case is I would have one Collection split across shards and whenever
> new document arrives in Collection I would like to get callback with
> document itself so that I can take some of the field from document being
> added and pass it on to other COllection.
>
> Kind of cascading addition , reason being we would like to create
> lightweight index(2-3 fields) for autosuggest which is only used for
> autosuggest  and replicated across all webservers where our app is running
>
> and for search we would direct to other collection as our search is not as
> latency sensitive as our autosuggest.
>
> any pointer would be helpful.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Intercept-updates-and-cascade-loading-of-Index-tp4115833.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Regards,
Shalin Shekhar Mangar.