掲示板

solr liferay intergration problem(Exception - Bad request)

13年前 に Amit Kumar Gupta によって更新されました。

solr liferay intergration problem(Exception - Bad request)

New Member 投稿: 24 参加年月日: 10/11/25 最新の投稿
Hi Friends,

I am integrating nutch+solr+liferay6.0.5.

I have installed nutch+solr. it is working. when searching by solr admin console , it is shows result.

Now i have install web-solr in liferay. i have made change in
$dir/webapps/solr-web/WEB-INF/conf/schema.xml and webapps/solr-web/WEB-INF/classes/META-INF/solr-spring.xml.

>reindex in liferay
>when search in liferay "search portlet" it does not show any result.when look into liferay/tomcat/log/catalina.out ,found following exception
request: http://localhost:4001/solr/update?wt=javabin&version=2.2
org.apache.solr.common.SolrException: Bad Request............


can you suggest any solution??????????????????
thumbnail
12年前 に SREEDHAR G によって更新されました。

RE: solr liferay intergration problem(Exception - Bad request)

New Member 投稿: 8 参加年月日: 10/12/19 最新の投稿
I am also working on the same line...... If you have prepared any documentation, Cna u pls send it to me.........?
sreeladdu@gmail.com
12年前 に Amit Kumar Gupta によって更新されました。

RE: solr liferay intergration problem(Exception - Bad request)

New Member 投稿: 24 参加年月日: 10/11/25 最新の投稿
I have achieved this
Step is given below

1. Download nutch
2. Extract and place say /home/amit/Installed/nutch-1.2
3. Make sure JAVA_HOME is properly set.
4. Add url to a flat file say urls/url.txt. Content of the url.txt will be like http://apache.org/
5. Add one URL per line.
6. Open conf/crawl_urlfilter.xml and replace MYDOMAIN from the respective domain name.
7. Open conf/nutch_default.xml or conf/nutch_site.xml add http.agent.name property.
8. Run this command to run nutch to crawl a site.
./bin/nutch crawl urls/url -dir your-custom-dir-to-store-indexed-data
9. For remaining arguments just run
./bin/nutch crawl
It should show the usage of nutch crawl.
Note: If it shows some errors that means JAVA_HOME or classpath is not correct.

1. Download Apache Solr.
2. Extract it to some directory say /home/amit/Installed/apache-solr-x.x
3. Create a directory say /home/amit/Installed/solr
4. This is our Solr home. Set an env variable for this. say $SOLR_HOME
5. Copy all files and folders which are inside example folder of the apache-solr dir.
6. Paste into solr home.
7. Now the structure will be like..
etc
example-DIH
exampledocs
lib
logs
multicore
README.txt
solr
start.jar
webapps
work
8. When Solr runs it needs some configurations and those are in $SOLR_HOME/solr/conf. Copy this conf folder into $SOLR_HOME so that it appears as $SOLR_HOME/conf
9. Check whether there is a schema.xml and solrconfig.xml in conf folder or not.
10. Now we have successfully set up Solr directory.

1. Install tomcat.
2. Copy apache-solr-x.x.war and rename it to solr.war and copy this to webapps.
3. Now we have to set solr.home option for tomcat. Copy this line to tomcat startup script.
export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/mydir/Installed/solr"
4. start tomcat.

1. Copy Nutch schema to Solr conf folder. Replace/backup if schema.xml exists.
Change Content tag true for all
2. Run command in nutch
./bin/nutch solrindex http://127.0.0.1:4001/solr/ crawl/crawldb crawl/linkdb crawl/segments/*
3. Now if everything goes smooth, nutch crawled data will be indexed in solr.
4. Search in Solr admin for some content, you should see the results.

1. Download solr-web.x.x.x.war from Liferay.
2. Deploy it.
3. After deploying it will throw some errors. This is because in solr-web plugin, solrserver is not configured.
4. Copy schema.xml from deployed solr-web/conf/ to $SOLR_HOME/conf.
5. Open solr-web/classes/WEB-INF/classes/META-INF/solr-spring.xml
6. Change constructor arg of com.liferay.portal.search.solr.server.BasicAuthSolrServer where solr server path is defined.
<constructor-arg type="java.lang.String" value="http://localhost:4001/solr" />
Give proper value for solr server.
7. Restart Liferay and Solr.
8. When Liferay is up again re-index all search indexes.

run below command
./bin/nutch crawl URL/urls -dir nutchDB
thumbnail
11年前 に Namrata Hangal によって更新されました。

RE: solr liferay intergration problem(Exception - Bad request)

Regular Member 投稿: 161 参加年月日: 10/07/27 最新の投稿
Hi Amit,

Any solution to displaying nutch indexed data in Liferay search portlet?