Hi,

Beware that post.jar is just an example tool to play with the default example 
index located at /solr/ namespace. It is very limited and you shold look 
elsewhere for a more production ready and robust tool.

However, it has the ability to specify custom url. Please try:

java -jar post.jar -help

> SimplePostTool: version 1.2
> This is a simple command line tool for POSTing raw XML to a Solr
> port.  XML data can be read from files specified as commandline
> args; as raw commandline arg strings; or via STDIN.
> Examples:
>   java -Ddata=files -jar post.jar *.xml
>   java -Ddata=args  -jar post.jar '<delete><id>42</id></delete>'
>   java -Ddata=stdin -jar post.jar < hd.xml
> Other options controlled by System Properties include the Solr
> URL to POST to, and whether a commit should be executed.  These
> are the defaults for all System Properties...
>   -Ddata=files
>   -Durl=http://localhost:8983/solr/update
>   -Dcommit=yes
> 


Thus for your index, try:
java -Durl=http://localhost:80/search/update -jar post.jar myfile.xml

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Training in Europe - www.solrtraining.com

On 10. aug. 2010, at 12.10, e8en wrote:

> 
> finally I found out the cause of my problem
> yes you don't need to delete the index and restart the tomcat just to get
> the data query result updated, you just need to commit the xml files.
> 
> I made a custom url as per requirement from my client
> default url -- >
> http://localhost/solr/select/?q=ITEM_CAT:817&version=2.2&start=0&rows=10&indent=on
> 
> my custom url -->
> http://localhost/search/select/?q=ITEM_CAT:817&version=2.2&start=0&rows=10&indent=on
> 
> I made the custom url by copy paste the solr.war and renamed it to
> search.war, so in webapps folder there are two war files
> this is the cause of my problem, when I use the default url there is no
> problem at all but when I use my custom url I have to delete, commit, and
> restart the tomcat to make the query result correctly.
> 
> the question is now changed :)
> how to make the search.war behave exactly the same like solr.war?
> maybe when I start the tomcat I should add some parameter so it will
> including/pointing to search.war not solr.war anymore?
> 
> when I removed the solr.war so there is only one war file in webapps folder
> which is search.war, I can't do commit, it said 'FATAL: Solr returned an
> error: Not Found'
> it is because the app searching solr.war not search.war
> -- 
> View this message in context: 
> http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1070189.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to