문제

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....

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top