how to use copy filed as only taken after the suffix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use copy filed as only taken after the suffix

UMA MAHESWAR
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
Reply | Threaded
Open this post in threaded view
|

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

Emir Arnautović
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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

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

Alexandre Rafalovitch
In reply to this post by UMA MAHESWAR
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 <[hidden email]> 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