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 solr2020 <ps...@gmail.com> on 2016/03/16 12:36:52 UTC

Solr:Skip document from indexing when it matches specific value

Hi,

How we can ignore a document from indexing into solr when a field matches
particular value.
Eg. we would like to ignore a document from indexing when document's field
path matches value "/content". Do we have any OOTB processors to accomplish
this in solr.

Thanks.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Skip-document-from-indexing-when-it-matches-specific-value-tp4264071.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr:Skip document from indexing when it matches specific value

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi

No OOTB as I know, but it would be 3 lines to create a custom one, which simply aborts the chain instead of calling super.processAdd(command)

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 16. mar. 2016 kl. 12.36 skrev solr2020 <ps...@gmail.com>:
> 
> Hi,
> 
> How we can ignore a document from indexing into solr when a field matches
> particular value.
> Eg. we would like to ignore a document from indexing when document's field
> path matches value "/content". Do we have any OOTB processors to accomplish
> this in solr.
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-Skip-document-from-indexing-when-it-matches-specific-value-tp4264071.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr:Skip document from indexing when it matches specific value

Posted by solr2020 <ps...@gmail.com>.
thanks.

i am able to do this by extending UpdateRequestProcessorFactory .



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Skip-document-from-indexing-when-it-matches-specific-value-tp4264071p4265526.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr:Skip document from indexing when it matches specific value

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/16/2016 5:36 AM, solr2020 wrote:
> How we can ignore a document from indexing into solr when a field matches
> particular value.
> Eg. we would like to ignore a document from indexing when document's field
> path matches value "/content". Do we have any OOTB processors to accomplish
> this in solr.

I do not know if any of the update processors included with Solr can do
this.  A list (possibly incomplete) of available update processors
included with Solr has been compiled by a third party:

http://www.solr-start.com/info/update-request-processors/

Here's some information in the community wiki:

https://wiki.apache.org/solr/UpdateRequestProcessor#Full_list_of_UpdateRequestProcessor_Factories

You can also write a custom update processor.  The most effective way to
do this is with Java, but there is a script processor included with Solr
that can utilize other languages like Javascript.

Here is information on configuring update processors in the Solr config:

https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors

Thanks,
Shawn