Wiki

Main | Proposals

Pluggable Enterprise Search with Solr

Using a Solr Server for Liferay Search

Since Solr is a standalone search engine, you will need to download it and install it first according to the instructions on the Solr web site (http://lucene.apache.org/solr). Once you have Solr up and running, integrating it with Liferay is easy, but it will require a restart of your application server.

Installing Solr

The first thing you will need to define is the location of your search index. Assuming you are running a Linux server and you have mounted a file system for the index at /solr, create an environment variable that points to this folder. This environment variable needs to be called $SOLR_HOME. So for our example, we would define:

 $SOLR_HOME=/solr

This environment variable can be defined anywhere you need: in your operating system's start up sequence, in the environment for the user who is logged in, or in the start up script for your application server. If you are going to use Tomcat to host Solr, you would modify catalina.sh or catalina.bat and add the environment variable there.

Once you have created the environment variable, you then can use it in your application server's start up configuration as a parameter to your JVM. This is configured differently per application server, but again, if you are using Tomcat, you would edit catalina.sh or catalina.bat and append the following to the $JAVA_OPTS variable:

 -Dsolr.solr.home=$SOLR_HOME

This takes care of telling Solr where to store its search index.

Installing the Solr Plugin

Next, you have a choice. If you have installed Solr on the same system upon which Liferay is running, you can simply go to a Plugin Installer portlet and install the solr-web plugin. Of course, if you are doing this for a clustered environment, it is likely that you are not running Liferay and your search engine on the same box, so you will have to make a change to a configuration file in the plugin before you install it. In this case, go to the Liferay web site (http://www.liferay.com) and download the plugin manually.

Open or extract the plugin. Inside the plugin, you will find a file called solr-spring.xml in the WEB-INF/classes/META-INF folder. Open this file in a text editor and you will see that there are two entries which define where the Solr server can be found by Liferay:

 <bean id="indexSearcher" class="com.liferay.portal.search.solr.SolrIndexSearcherImpl">
     <property name="serverURL" value="[http://localhost:8080/solr/select"] />
 </bean>
 <bean id="indexWriter" class="com.liferay.portal.search.solr.SolrIndexWriterImpl">
     <property name="serverURL" value="[http://localhost:8080/solr/update"] />
 </bean>

Modify these values so that they point to the server upon which you are running Solr. Then save the file and put it back into the plugin archive in the same place it was before.

Next, extract the file schema.xml from the plugin. This xml file describes how the fields will be indexed to the Solr index and it should be located in the docroot/WEB-INF/conf folder. Copy this file to $SOLR_HOME/conf (you may have to create the conf directory). Now go ahead and start the application server upon which you are going to install Solr. This can be the same server Liferay is running on or a completely different box (a separate box for your search server will give you better performance). Install the Solr .war file to this application server.

You can now hot deploy the solr-web plugin to all of your nodes.

Once the plugin is hot deployed, your Liferay search is automatically upgraded to use Solr. It is likely, however, that initial searches will come up with nothing: this is because you will need to reindex everything using Solr.

Go to the Admin Portlet. Click the Server tab and then click the Execute button next to Reindex all search indexes. It may take a while, but Liferay will begin sending indexing requests to Solr for execution. When the process is complete, Solr will have a complete search index of your site, and will be running independently of all of your Liferay nodes.

Installing the plugin to your nodes has the effect of overriding any calls to Lucene for searching. All of Liferay's search boxes will now use Solr as the search index. This is ideal for a clustered environment, as it allows all of your nodes to share one search server and one search index, and this search server operates independently of all of your nodes.

11284 Views , 1 Attachments 1 Attachments

Average (0 Votes)
Comments Flat View

Great stuff, but can you say something about what the benefits would be? What additional capabilities does it have or how is it better? Will LR move to solr by default in the future?

Posted on 8/15/08 7:10 AM.

Top Top
Hi Marcelo, Solr fixes some problems we have with clustered portal, think as an replacement of Lucene JDBC.

There is an performance improvement if you have many search requests, you can setup several Solr instances to handle these requests. Liferay will continue to use Lucene as a default impl.

Posted on 8/15/08 4:42 PM in reply to Marcelo Ruiz Camauër.

Top Top
Could you also tell, is there a frontend (a plugin etc) which will show how to use the solr interface to search the database. If I am understanding things correctly, all the plugin does is sets up solr to just index the data again. However, it doesn't talk about how to use solr from a web page etc. Is there any example of this?

cheers,
Brian

Posted on 8/17/08 11:27 AM in reply to Bruno Farache.

Top Top
Hi Brian,

I don't remember any current plugin that does searching, but you can take a look at how this is done by looking at some portlets in the core. Try to search for Indexer.java (this is called whenever an entity is added) and for search methods within *LocalServiceImpl.java classes.

Anyways, it's a good idea to have a sample-search-portlet or something like that, thank you for bringing this up.

Besides using the portal to make searches you can also use an web interface that comes with Solr, you just need to go to http://{solr.address}/solr. It has a simple interface but I think it's easy to change it. Solr also provides search results based on a given XSLT file. For more info, take a look at Solr's documentation:


http://wiki.apache.org/solr/XsltResponseWriter?highlight=(xslt)
http://wiki.apache.org/solr/SolrAdminGUI

A good introductory article about Solr:

http://www.ibm.com/developerworks/java/library/j-solr1/

Posted on 8/18/08 6:03 PM in reply to brian mcsweeney.

Top Top
I not sure if I answered you question correctly, clarifying it more:

Solr is not only used for indexing. The portal picks whichever search plugin is installed at the moment and uses it for both indexing and searching.

Posted on 8/18/08 6:22 PM in reply to Bruno Farache.

Top Top
Hi Bruno,

excellent answer. Thanks very much. Just to make sure I'm correct, so are you saying if you just install the solr plugin and restart liferay, then all searches in liferay will automatically switch to using solr under the hood?

Definitely I think a sample search portlet that uses it would be great. Also, am I right in thinking that Solr simplifies the querying process, vs straight Lucene for example, as it accepts XSLT as you say.

Anyway, will have a look at your links, thanks very much for your help.

Brian

Posted on 8/19/08 10:29 AM in reply to Bruno Farache.

Top Top
Hi Brian,

No, as this Wiki page explains, after the plugin is installed you need to go to the Admin porltet and click on "Reindex all search indexes".

Posted on 8/23/08 6:06 AM in reply to brian mcsweeney.

Top Top
Thank you very much for the information, I have installed solr and the plugin and seems to work fin for the blog entries and wiki, but not the discussions.

I installed Solr with the schema attached to this wiki. and Solr indexed the content from the discussions but when busing the search function on the discussion portlet nothing is displayed.

Any ideas what could be causing this problem?

Thanks!

Posted on 9/30/08 4:49 PM.

Top Top
Fixed in http://support.liferay.com/browse/LEP-7724

Posted on 10/2/08 8:38 AM in reply to Carlos del Castillo.

Top Top
i have a question, by deploying the plug-in every search directed to solr? (mm,, probably with admin re-indexing or whatever). How about if i want to revert back to default lucene. just remove the portlet would do? May be i dont quite understand how liferay were able to make a conclusion that, it would direct all its searches just by knowing the solr war is there. can you explain a bit more.

thanks

Posted on 11/19/08 6:29 AM.

Top Top
btw, what is the evident that the searching is using solr indexes (after having completed all these steps successfully) and how much do i have the control over it?

Posted on 11/19/08 6:37 AM.

Top Top
Hi ,
I have configured Solr server on my localhost,It is running fine on http://localhost:8983/solr/admin

And I have created a folder by name Solr in my local C Drive and I have copied schema.xml under solr/conf.

I have set SOLR_HOME = c:/solr
and appended -Dsolr.solr.home=%SOLR_HOME% for java_opts

And I have a doubt regarding solr-spring.xml, the port no should be my server (tomcat) running port or the port on which solr is running

<bean id="indexSearcher" class="com.liferay.portal.search.solr.SolrIndexSearcherImpl">
<property name="serverURL" value="[http://localhost:8080/solr/select"] />
</bean>
<bean id="indexWriter" class="com.liferay.portal.search.solr.SolrIndexWriterImpl">
<property name="serverURL" value="[http://localhost:8080/solr/update"] />
</bean>


And I have deployed using plugin installer of application.

"Once the plugin is hot deployed, your Liferay search is automatically upgraded to use Solr."

how does i come to know, the search is now by solr not by lucene and I was getting results in intial searches against this line "It is likely, however, that initial searches will come up with nothing: this is because you will need to reindex everything using Solr."

Finally my lucene folder under liferay , is getting modified by current time and I could not find any index files generating under my solr home.

Was I doing anything wrong, any help highly appreciated.

Regards
Suresh Midde

Posted on 12/23/08 12:11 PM.

Top Top
Kuhajeyan, you're right, undeploying Solr plugin will default back to Lucene. You would just need to reindex the portal against Lucene.

Look at Solr admin UI to check if your content is being indexed.

Posted on 1/14/09 8:05 AM in reply to kuhajeyan gunaratnam.

Top Top
Hello, I'm using Liferay 5.2.2 ,and the solr plugin (solr-web-5.2.0.1.war) with solr 1.3.

But when I try to search users, an error occur.
Take a look at this post:
https://www.liferay.com/web/guest/community/forums/-/message_boards/message/2957400/maximized

Can you help us?

Thank you
Diego

Posted on 4/28/09 2:03 AM in reply to Bruno Farache.

Top Top
hi guy,
i want same advise n help.

i use liferay 5.1.1

And I have created a folder by name Solr in my local C Drive and I have copied schema.xml under solr/conf.

I have set SOLR_HOME = c:/solr
in fail setenv.bat, i add -Dsolr.solr.home=%SOLR_HOME%

And I have change in solr-spring.xml,

<bean id="indexSearcher" class="com.liferay.portal.search.solr.SolrIndexSearcherImpl">
<property name="serverURL" value="http://localhost:6080/solr/select" />
</bean>
<bean id="indexWriter" class="com.liferay.portal.search.solr.SolrIndexWriterImpl">
<property name="serverURL" value="http://localhost:6080/solr/update" />
</bean>

but after i running liferay..this error appear..
Jun 3, 2009 3:58:01 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-6080
Jun 3, 2009 3:58:01 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:6009
Jun 3, 2009 3:58:01 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Jun 3, 2009 3:58:01 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 32029 ms
03:58:30,765 ERROR [SolrIndexSearcherImpl:79] Error while sending request to Solr
java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.subset(SolrIndexSearcherImpl.java:102)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:76)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:78)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:92)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:75)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:46)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:69)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:59)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
03:58:30,765 ERROR [SolrReaderMessageListener:49] Unable to process message com.liferay.portal.kernel.messaging.Message@1c3a0dd
com.liferay.portal.kernel.search.SearchException: java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:81)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:78)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:92)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:75)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:46)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:69)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:59)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.subset(SolrIndexSearcherImpl.java:102)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:76)
... 9 more
03:58:40,687 ERROR [IncludeTag:52] Current URL /web/guest/home generates exception: javax.servlet.ServletException: com.liferay.portal.SystemException
: com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.messaging.MessageBusException: No reply received for request: com.lifera
y.portal.kernel.messaging.Message@1c3a0dd
03:58:40,703 ERROR [IncludeTag:52] com.liferay.portal.SystemException: com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.mes
saging.MessageBusException: No reply received for request: com.liferay.portal.kernel.messaging.Message@1c3a0dd
at com.liferay.portal.plugin.PluginPackageUtil._search(PluginPackageUtil.java:1253)
at com.liferay.portal.plugin.PluginPackageUtil.search(PluginPackageUtil.java:238)

can anyone help me out.

Posted on 6/2/09 9:05 PM.

Top Top
hii team,

i using liferay 5.1.1

And I have created a folder by name Solr in my local C Drive and I have copied schema.xml under solr/conf.

I have set SOLR_HOME = c:/solr
and add -Dsolr.solr.home=%SOLR_HOME% in fail setenv.bat

And I have change solr-spring.xml like this

<bean id="indexSearcher" class="com.liferay.portal.search.solr.SolrIndexSearcherImpl">
<property name="serverURL" value="http://localhost:6080/solr/select" />
</bean>
<bean id="indexWriter" class="com.liferay.portal.search.solr.SolrIndexWriterImpl">
<property name="serverURL" value="http://localhost:6080/solr/update" />
</bean>

the error appear when i running liferay.

Jun 3, 2009 3:58:01 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-6080
Jun 3, 2009 3:58:01 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:6009
Jun 3, 2009 3:58:01 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Jun 3, 2009 3:58:01 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 32029 ms
03:58:30,765 ERROR [SolrIndexSearcherImpl:79] Error while sending request to Solr
java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.subset(SolrIndexSearcherImpl.java:102)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:76)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:78)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:92)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:75)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:46)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:69)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:59)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
03:58:30,765 ERROR [SolrReaderMessageListener:49] Unable to process message com.liferay.portal.kernel.messaging.Message@1c3a0dd
com.liferay.portal.kernel.search.SearchException: java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:81)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:78)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:92)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:75)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:46)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:69)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:59)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.subset(SolrIndexSearcherImpl.java:102)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:76)
... 9 more
03:58:40,687 ERROR [IncludeTag:52] Current URL /web/guest/home generates exception: javax.servlet.ServletException: com.liferay.portal.SystemException
: com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.messaging.MessageBusException: No reply received for request: com.lifera
y.portal.kernel.messaging.Message@1c3a0dd
03:58:40,703 ERROR [IncludeTag:52] com.liferay.portal.SystemException: com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.mes
saging.MessageBusException: No reply received for request: com.liferay.portal.kernel.messaging.Message@1c3a0dd
at com.liferay.portal.plugin.PluginPackageUtil._search(PluginPackageUtil.java:1253)
at com.liferay.portal.plugin.PluginPackageUtil.search(PluginPackageUtil.java:238)

can anyone show me the right way..

Posted on 6/2/09 9:09 PM in reply to Diego Alejandro Palmeira.

Top Top
I can see absolutely NO benefits with plugin. Liferay is already overengineered with wrappers around Lucene which make extremely hard for instance to use multivalued non-tokenized "Tagged Content" (tags) field for "faceted search" (main selling point of SOLR).
Liferay, even 5.2.4 EE, has even bugs (some 'core' developers don't understand difference between Tokenizer implementations, and even use StringPool.BLANK during retrieval of plain text from Journal XML).

Why do we need _such_ SOLR? Isn't Lucene providing the same functionality?

Wow, you can even use SOLR sharding, and manage thread pools, funny...

Just create web-plugin with rich configuration options, and use SOLR as a completely separate engine (not for indexing Liferay's objects!)
For internal indexing of Liferay's objects plain Lucene is more than enough. Of course SOLR adds better configuration options: for instance you can configure different request handlers, different analyzers for the same field, and more, - but HOW to do it with overengineered Liferay's wrappers, and why do you wrap almost everything including Lucene?

Thanks

Posted on 6/20/09 11:09 PM in reply to Marcelo Ruiz Camauër.

Top Top
I can see absolutely NO benefits with plugin. Liferay is already overengineered with wrappers around Lucene which make extremely hard for instance to use multivalued non-tokenized "Tagged Content" (tags) field for "faceted search" (main selling point of SOLR).
Liferay, even 5.2.4 EE, has even bugs (some 'core' developers don't understand difference between Tokenizer implementations, and even use StringPool.BLANK during retrieval of plain text from Journal XML).

Why do we need _such_ SOLR? Isn't Lucene providing the same functionality?

Wow, you can even use SOLR sharding, and manage thread pools, funny...

Just create web-plugin with rich configuration options, and use SOLR as a completely separate engine (not for indexing Liferay's objects!)
For internal indexing of Liferay's objects plain Lucene is more than enough. Of course SOLR adds better configuration options: for instance you can configure different request handlers, different analyzers for the same field, and more, - but HOW to do it with overengineered Liferay's wrappers, and why do you wrap almost everything including Lucene?

Thanks

Posted on 6/20/09 11:11 PM.

Top Top
Ok, now I understand why:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Pluggable+Enterprise+Search

- yes, separate Search Engine from Liferay Container is the main reason, and SOLR plugin is first and easiest step.

But again, instead of something 'abstract' let's do real staff, such as using _the_full_power_ of SOLR instead of focusing on minimal subset of features supported by any imaginable engine...

How do you handle multilingual support during indexing, for instance? Do you use language analyzers, word stemmers, synonym dictionaries for different languages? Do you provide SOLR with language attribute of the document? Do you 'analyze' user's query, and how? Stop-wrods for French?

Posted on 6/20/09 11:22 PM in reply to Fuad Efendi.

Top Top
Hi, Fuad,

Your questions are very good... Bruno, can You answer them, please?

with best regards, Artur

Posted on 9/8/09 1:13 AM in reply to Fuad Efendi.

Top Top
Hi Fuad and Artur, good points - multilingual support? where is it? Can anyone answer them? Jonas

Posted on 10/21/09 5:08 PM in reply to Artur Linhart.

Top Top
Hello everybody, I just upgraded to Liferay 5.2.3. I installed the solr plugin 5.2.0.1 (backend solr is 1.3.0) and reindexed liferay. Everything went fine with the reindexing but when I try to do a search I get the following error:

21:55:29,229 ERROR [SolrIndexSearcherImpl:97] Error while sending request to Solr
java.lang.NullPointerException
at org.apache.solr.client.solrj.SolrQuery.toSortString(SolrQuery.java:497)
at org.apache.solr.client.solrj.SolrQuery.addSortField(SolrQuery.java:293)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:88)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:79)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:86)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:68)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:44)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:70)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
21:55:29,230 ERROR [SolrReaderMessageListener:47] Unable to process message {destination=liferay/search_reader, responseDestination=liferay/search_reader/response, responseId=a6a02f6d-b7e1-4faf-bd8a-557da69665e5, payload={command=SEARCH, companyId=10109, id=null, doc=null, query=+(+portletId:33) +(userName:test title:test content:test tagsEntries:test), sorts=[Lcom.liferay.portal.kernel.search.Sort;@1055900a, start=0, end=20}, values=null}
com.liferay.portal.kernel.search.SearchException: java.lang.NullPointerException
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:99)
at com.liferay.portal.search.solr.SolrSearchEngineUtil.search(SolrSearchEngineUtil.java:79)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doCommandSearch(SolrReaderMessageListener.java:86)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.doReceive(SolrReaderMessageListener.java:68)
at com.liferay.portal.search.solr.messaging.SolrReaderMessageListener.receive(SolrReaderMessageListener.java:44)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:70)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.solr.client.solrj.SolrQuery.toSortString(SolrQuery.java:497)
at org.apache.solr.client.solrj.SolrQuery.addSortField(SolrQuery.java:293)
at com.liferay.portal.search.solr.SolrIndexSearcherImpl.search(SolrIndexSearcherImpl.java:88)
... 9 more
21:55:39,239 ERROR [jsp:1109] com.liferay.portlet.blogs.util.BlogsOpenSearchImpl com.liferay.portal.SystemException: com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.messaging.MessageBusException: No reply received for message: {destination=liferay/search_reader, responseDestination=liferay/search_reader/response, responseId=a6a02f6d-b7e1-4faf-bd8a-557da69665e5, payload={command=SEARCH, companyId=10109, id=null, doc=null, query=+(+portletId:33) +(userName:test title:test content:test tagsEntries:test), sorts=[Lcom.liferay.portal.kernel.search.Sort;@1055900a, start=0, end=20}, values=null}

I'm using the global search tool. It only finds users and web content. But no blogs or wiki pages. (The query should return blog entries and wiki pages).


On the solr server side I only see this in the logs:

INFO: [] webapp=/solr path=/select params={fl=score&sort=displayDate+desc&start=0&q=%2B(%2BportletId:15)+%2B(title:test+content:test+description:test+tagsCategories:test+tagsEntries:test+type:test)&wt=javabin&rows=5&version=2.2} hits=9 status=0 QTime=1


Any ideas on how to fix this? Thanks

Posted on 10/30/09 3:06 PM.

Top Top
Is there anyway to get a clustered search *without* using Solr?

We do not need a high-performance search, but we do need a cluster. But it seems Lucene/JDBC cannot be used....

Posted on 2/2/10 2:00 AM in reply to Carlos del Castillo.

Top Top