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 UMA MAHESWAR <um...@in.ebmpapst.com> on 2019/07/15 12:54:57 UTC

how to use copy filed as only taken after the suffix

hi all,
i am working as solr developer and my ask is to title field  is copied to
copyField to content type but  i want o index only suffix (.)after
vslue(like docx,ppt,jpg like that) is there any way.

thank and regards,
uma



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: how to use copy filed as only taken after the suffix

Posted by Emir Arnautović <em...@sematext.com>.
Hi Uma,
Take a look at https://lucene.apache.org/solr/guide/8_1/charfilterfactories.html#solr-patternreplacecharfilterfactory <https://lucene.apache.org/solr/guide/8_1/charfilterfactories.html#solr-patternreplacecharfilterfactory>
Depending on your usecase, this might be enough for you.

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 15 Jul 2019, at 14:54, UMA MAHESWAR <um...@in.ebmpapst.com> wrote:
> 
> hi all,
> i am working as solr developer and my ask is to title field  is copied to
> copyField to content type but  i want o index only suffix (.)after
> vslue(like docx,ppt,jpg like that) is there any way.
> 
> thank and regards,
> uma
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: how to use copy filed as only taken after the suffix

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Hi Uma,

You have three options:
1) If you are indexing only that field and not returning to the user,
than you can mark it store=false and use one of the many filters to
transform your content
2) If you are interested in both storing and indexing, then be aware
that the stored representation will match the original (full) file
name
3) You can additional/instead pre-process content using Update Request
Processors. So, you can strip the filename part there:
https://lucene.apache.org/solr/guide/8_1/update-request-processors.html

Regards,
   Alex.

On Mon, 15 Jul 2019 at 09:44, UMA MAHESWAR <um...@in.ebmpapst.com> wrote:
>
> hi all,
> i am working as solr developer and my ask is to title field  is copied to
> copyField to content type but  i want o index only suffix (.)after
> vslue(like docx,ppt,jpg like that) is there any way.
>
> thank and regards,
> uma
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html