how to commit certain xml files using PHP commit()

2010-08-08 Thread e8en

I'm solr newbie,
I use my PHP script to delete index and commit certain xml file in solr

this is what I do:
$solr->deleteByQuery('ITEM_CAT:576');
$solr->commit();

the question is, how to commit certain xml file, for example to do this:
java -jar post.jar cat_576.xml

please help me
thanks before :)
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-commit-certain-xml-files-using-PHP-commit-tp1050988p1050988.html
Sent from the Solr - User mailing list archive at Nabble.com.


how to query a string using solr URL in the browser

2010-08-09 Thread e8en

hi everyone,
this is my solr query link and the result that showed in my browser where
ITEM_CAT = 1191

http://172.11.18.120:9000/search/select/?q=ITEM_CAT:1191&q.op=AND&start=0&rows=1000

1
1.0
27017
Bracket Ceiling untuk semua merk projector,
panjang 60-90 cm  Bahan Besi Cat Hitam = 325rb Bahan Sta
/aksesoris-batere-dan-tripod/update-bracket-projector-dan-lcd-plasma-tv-607136.html
607136
Nego
7
270/27017/bracket_lcd_plasma_3a-1274291780.JPG
2010-05-19 17:56:45
[UPDATE] BRACKET Projector dan LCD/PLASMA TV
1
0
0
0
0
0
0
0
28


what I want to ask is how to search a word for example "bracket" by changing
the url into this (see the bold):
http://172.11.18.120:9000/search/select/?q=text:bracket&q.op=AND&start=0&rows=1000

so it will resulted all ITEM_ID that has AUC_DESCR_SHORT & AUC_TITLE
containing "bracket" word

really really appreciate your help
thanks in advance

cheers,
Eben
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-query-a-string-using-solr-URL-in-the-browser-tp1052434p1052434.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to query a string using solr URL in the browser

2010-08-09 Thread e8en

someone please help me, I'm running out of time :(
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-query-a-string-using-solr-URL-in-the-browser-tp1052434p1054327.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to query a string using solr URL in the browser

2010-08-09 Thread e8en

Hi Otis,
your answer gave me some lights :)

the input must be:
http://172.11.18.120:9000/search/select/?q=text:bracket&q.op=AND&start=0&rows=1000

how to change 'AUC_DESCR_SHORT:bracket' and 'AUC_TITLE:bracket' into
'text:bracket' ?
is there any solution?

thanks,
Eben
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-query-a-string-using-solr-URL-in-the-browser-tp1052434p1055270.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to query a string using solr URL in the browser

2010-08-09 Thread e8en

I forgot something,

when I enter this:
http://172.11.18.120:9000/search/select/?q=text:bracket&q.op=AND&start=0&rows=1000

the result will show all ITEM_ID that contain 'bracket' word in both or one
of ITEM_DESCR_SHORT or ITEM_TITLE

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-query-a-string-using-solr-URL-in-the-browser-tp1052434p1055353.html
Sent from the Solr - User mailing list archive at Nabble.com.


solr query result not read the latest xml file

2010-08-09 Thread e8en

hi everyone,

I do these steps every time the new xml file created (for example
cat_978.xml has just been created):
1. delete the index (AUC_CAT:978)
2. commit the new cat_978.xml (java -jar post.jar cat_978.xml)
3. restart the java (stop and java -jar start.jar)

if I'm not done those steps then the query result showed in the browser
still using the old value (cat_978.xml - no changes at all) instead of
reading the new cat_978.xml

what I want to ask, is there a way so I don't need to restart the java since
it consume too much resources and time?

thanks in advance,
Eben
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1066785.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr query result not read the latest xml file

2010-08-10 Thread e8en

I already set in my solrconfig.xml as you told me:


and then I commit the xml
and it's still not working
the query result still show the old data :(

do you have any suggestion?

Eben
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1068647.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr query result not read the latest xml file

2010-08-10 Thread e8en

yes I try with both value, never304="true" and never304="false" and none of
them make it works
what is curl and wget?
I use mozilla firefox browser
I'm really newbie in programming world especially solr
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1068751.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: solr query result not read the latest xml file

2010-08-10 Thread e8en

hi Bastian,
how to send a ?
is it by typing : java -jar post.jar cat_978.xml?

if yes then I've already done that
any solution please?
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1068782.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr query result not read the latest xml file

2010-08-10 Thread e8en

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.


Re: solr query result not read the latest xml file

2010-08-10 Thread e8en

thanks for you response Jan,
I just knew that the post.jar only an example tool
so what should I use if not post.jar for production?

btw, I already tried using this command:
java -Durl=http://localhost:8983/search/update -jar post.jar cat_817.xml

and IT WORKS !!
the cat_817.xml reflected directly in the solr query after I commit the
cat_817.xml, this is the url:
http://localhost:8983/search/select/?q=ITEM_CAT:817&version=2.2&start=0&rows=10&indent=on

the problem is it works if the old xml contain less doc than the new xml,
for example if the old cat_817.xml contain 2 doc and the new cat_817.xml
contain 10 doc then I just have to re-index (java
-Durl=http://localhost:8983/search/update -jar post.jar cat_817.xml) and it
the query result will have correct result (10 doc), but it doesn't work vice
versa.
If the old cat_817.xml contain 10 doc and the new cat_817.xml contain 2 doc,
then I have to delete the index first (java -Ddata=args -Dcommit=yes -jar
post.jar "ITEM_CAT:817") and re-index it
(java -Durl=http://localhost:8983/search/update -jar post.jar cat_817.xml)
to make the query result updated (2 doc).

is it a normal process or something wrong with my solr?

once again thanks again Jan, your help really make my day brighter :)
and I believe your answer will help many solr newbie especially me
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-query-result-not-read-the-latest-xml-file-tp1066785p1081802.html
Sent from the Solr - User mailing list archive at Nabble.com.