Question

I am using Lucid Works to create index of solr.

Source : Database

I have two similar columns in my database, Party1, Party2.

I am using a SQL Statement like this;

SELECT top 1000000 OrderId as id
, Party1 as PartyNameFirst
, Party2 as PartyNameLast
FROM dbo.vw_SolrRPSTRD

I wanted to get both Party as a single fieled, seperated by ",". I know it is deals with multivalued field and splitby function. But unable to get sample.

Please guide me in this.

Thanks In Advance....

Was it helpful?

Solution

Looks like you are using SQL Server. You can concatenate them in SQL itself and keep a single-valued Solr field:

SELECT top 1000000 OrderId as id, 
Party1 + ', ' + Party2 as PartyName
FROM dbo.vw_SolrRPSTRD
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top