Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:58:48+00:00 2026-05-28T17:58:48+00:00

Scenario: In the database I have a field called Categories which of type string

  • 0

Scenario:

In the database I have a field called Categories which of type string and contains a number of digits pipe delimited such as 1|8|90|130|

What I want:

In Solr index, I want to have 2 fields:

  • Field Categories_ pipe which would contain the exact string as in the DB i.e. 1|8|90|130|
  • Field Categories which would be a multi-valued field of type INT containing values 1, 8, 90 and 130

For the latter, in the entity specification I can use a regexTransformer then I specify the following field in data-config.xml:
<field column="Categories" name="Navigation" splitBy="\|"/> and then specify the field as multi-valued in schema.xml

What I do not know is how can I ‘copy’ the same field twice and perform regex splitting only on one. I know there is the copyField facility that can be defined in schema.xml however I can’t find a way to transform the copied field because from what I know (and I maybe wrong here), transformers are only available in the entity specification.

As a workaround I can also send the same field twice from the entity query but in reality, the field Categories is a computed field (selects nested) which is somewhat expensive so I would like to avoid it.

Any help is appreciated, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:58:50+00:00Added an answer on May 28, 2026 at 5:58 pm

    Instead of splitting it at data-config.xml. You could do that in your schema.xml. Here is what you could do,

    1. Create a fieldType with tokenizer PatternTokenizerFactory that uses regex to split based on |.
    2. FieldSplit: Create a multivalued field using this new fieldType, will eventually have 1,8,90,130
    3. FieldOriginal: Create String field (if you need no analysis on that), that preserves original value 1|8|90|130|
    4. Now you can use copyField to copy FieldSplit , FieldOriginal values based on your need.

    Check this Question, it is similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table with a unique string field and a couple of
I have a very simple scenario involving a database and a JMS in an
I have what appears to be a fairly common scenario: I have a database
Our scenario: We have a main database that stores company-wide information. We have several
I have this scenario where I need data integrity in the physical database. For
I have the following scenario: Entities are loaded from the database. One of them
Database: DB2 v9.5 on AIX Scenario: I have 2 instances- db2inst1 and db2inst2. I
I have a following scenario in my SQL Server 2005 database. zipcodes table has
I have a typical dev scenario: I have a SQL 2008 database that I
I have the following scenario: I have various user's data stored in my database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.