Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bartlomiej Knabel
Liferay 6.06 - Solr 3.2.0
June 22, 2011 5:49 AM
Answer

Bartlomiej Knabel

Rank: Junior Member

Posts: 57

Join Date: January 30, 2011

Recent Posts

Hi,

I'm trying to integrate Liferay 6.06 with Solr 3.2.0, but I've some problems.
Probably my schema.xml is wrong for 3.2.0 - do You have schema.xml compatibili with 3.2.0 ?

kind regards
Bartlomiej Knabel
RE: Liferay 6.06 - Solr 3.2.0
June 22, 2011 6:49 AM
Answer

Bartlomiej Knabel

Rank: Junior Member

Posts: 57

Join Date: January 30, 2011

Recent Posts

At this moment I have following errors in SOLR logs:

INFO: [] webapp=/solr path=/update params={waitSearcher=true&commit=true&waitFlush=true&wt=javabin&version=2} status=0 QTime=246
2011-06-22 15:42:07 org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: can not sort on multivalued field: lastName


11-06-22 15:48:08 org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: ERROR: [15_PORTLET_10157_FIELD_34319] multiple values encountered for non multiValued field roleId: [10139, 10140]
at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:242)
Bartlomiej Knabel
RE: Liferay 6.06 - Solr 3.2.0
June 22, 2011 7:02 AM
Answer

Bartlomiej Knabel

Rank: Junior Member

Posts: 57

Join Date: January 30, 2011

Recent Posts

ok, I found solution:

http://www.liferay.com/community/forums/-/message_boards/message/9024087
Fernando Rubio Sancho
RE: Liferay 6.06 - Solr 3.2.0
September 27, 2012 2:52 AM
Answer

Fernando Rubio Sancho

Rank: New Member

Posts: 10

Join Date: September 16, 2012

Recent Posts

Hi Bartlomeij I have the same problem.

My schema.xml contains:

</schema>
....
<field name="firstName" type="string" indexed="true" stored="true" />
<field name="lastName" type="string" indexed="true" stored="true" />
<field name="screenName" type="string" indexed="true" stored="true" />
<field name="name_sortable" type="string" indexed="true" stored="true" />
<field name="lastName_sortable" type="string" indexed="true" stored="true" />
<field name="firstName_sortable" type="string" indexed="true" stored="true" />
<field name="screenName_sortable" type="string" indexed="true" stored="true" />
<dynamicField name="*" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="*CategoryNames" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="*CategoryIds" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="expando/*" type="text" indexed="true" multiValued="true" stored="true" />
<dynamicField name="web_content/*" type="text" indexed="true" stored="true" />
</fields>
<copyField source="firstName" dest="firstName_string" />
<copyField source="lastName" dest="lastName_string" />
<copyField source="name" dest="name_string" />
<uniqueKey>uid</uniqueKey>
<defaultSearchField>content</defaultSearchField>
<solrQueryParser defaultOperator="OR" />
</schema>

And my portlet.propeties for solr-web in tomcat contains:

solr.sortable.text.fields =firstName,lastname,name

solr.copy.field=firstName_string
solr.copy.field=lastName_string
solr.copy.field=name_string

In Liferay when I go to the Portal->Users and Organizations the solr says: I can not sort on multivaued field: last-name. And don't show nothing.

Can you help me?
Djordje Karanovic
RE: Liferay 6.06 - Solr 3.2.0
November 23, 2012 7:18 AM
Answer

Djordje Karanovic

Rank: New Member

Posts: 4

Join Date: October 6, 2011

Recent Posts

Fernando, you must change field lastName to last-name
This is the last part of schema.xml that worked for me:


<fields>
<!-- Liferay content fields -->
<field name="comments" type="text" indexed="true" stored="true" />
<field name="description" type="text" indexed="true" stored="true" />
<field name="entryClassPK" type="text" indexed="true" stored="true" />
<field name="firstName" type="text" indexed="true" stored="true" />
<field name="firstName_sortable" type="string" indexed="true" stored="true" />
<field name="last-name" type="text" indexed="true" stored="true" />
<field name="lastName_sortable" type="string" indexed="true" stored="true" />
<field name="leftOrganizationId" type="slong" indexed="true" stored="true" />
<field name="name" type="text" indexed="true" stored="true" />
<field name="name_sortable" type="string" indexed="true" stored="true" />
<field name="properties" type="string" indexed="true" stored="true" />
<field name="rightOrganizationId" type="slong" indexed="true" stored="true" />
<field name="url" type="string" indexed="true" stored="true" />
<field name="userName" type="string" indexed="true" stored="true" />
<field name="version" type="string" indexed="true" stored="true" />
<dynamicField name="*" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="*CategoryNames" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="*CategoryIds" type="string" indexed="true" multiValued="true" stored="true" />
<dynamicField name="expando/*" type="text" indexed="true" multiValued="true" stored="true" />
<dynamicField name="web_content/*" type="text" indexed="true" stored="true" />

<!-- Common fields -->
<field name="content" type="text" indexed="true" stored="true" />
<field name="title" type="text" indexed="true" stored="true" />
<field name="uid" type="string" indexed="true" stored="true" />

<!-- File system fields -->
<field name="fileName" type="string" indexed="true" stored="true" />
<field name="author" type="string" indexed="true" stored="true"/>

</fields>
<copyField source="firstName" dest="firstName_sortable" />
<copyField source="last-name" dest="lastName_sortable" />
<copyField source="name" dest="name_sortable" />
Fernando Rubio Sancho
RE: Liferay 6.06 - Solr 3.2.0
November 26, 2012 10:24 AM
Answer

Fernando Rubio Sancho

Rank: New Member

Posts: 10

Join Date: September 16, 2012

Recent Posts

Thanks Djordje!
Jan Eerdekens
RE: Liferay 6.06 - Solr 3.2.0
February 15, 2013 2:25 AM
Answer

Jan Eerdekens

Rank: New Member

Posts: 15

Join Date: January 20, 2011

Recent Posts

I also had to add extra field, xxx_sortable and copyField declarations for job-title, screen-name and type for this to work correctly, because otherwise the sorting on the different columns in the Users and Organisations part of the control panel wouldn't work (incomplete page would be shown: only search box, no table).