parsing the raw query string?

2009-12-05 Thread regany

I've just found solr and am looking at what's involved to work with it. All
the examples I've seen only ever use 1 word search terms being implemented
as examples, which doesn't help me trying to see how multiple word queries
work. It also looks like a hell of a lot of processing needs to be done on
the raw query string even before you can pass it to solr (in PHP) - is
everyone processing the query string first and building a custom call to
solr, or is there a query string parser I've missed somewhere? I can't even
find what operators (if any) are able to be used in the raw query string in
the online docs (maybe there aren't any??). Any help or points in the right
direction would be appreciated.
-- 
View this message in context: 
http://old.nabble.com/parsing-the-raw-query-string--tp26662578p26662578.html
Sent from the Solr - User mailing list archive at Nabble.com.



how to set CORE when using Apache Solr extension?

2009-12-07 Thread regany

Hello,

Can anyone tell me how you set which Solr CORE to use when using the Apache
Solr extension? (Using Solr with multicores)
http://www.php.net/manual/en/book.solr.php

thanks,
regan
-- 
View this message in context: 
http://old.nabble.com/how-to-set-CORE-when-using-Apache-Solr-extension--tp26685174p26685174.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Stopping & Starting

2009-12-07 Thread regany


Lee Smith-6 wrote:
> 
> So how can I stop and restart the service ?
> 
> Hope you can help get me going again.
> 
> Thank you
> Lee
> 


I found this shell script which works well for me...


#!/bin/sh -e

# Starts, stops, and restarts solr

SOLR_DIR="/usr/local/solr/example"
JAVA_OPTIONS="-Xmx1024m -DSTOP.PORT=8079 -DSTOP.KEY=stopkey -jar start.jar"
LOG_FILE="/var/log/solr.log"
JAVA="/usr/bin/java"

case $1 in
start)
echo "Starting Solr"
cd $SOLR_DIR
$JAVA $JAVA_OPTIONS 2> $LOG_FILE &
;;
stop)
echo "Stopping Solr"
cd $SOLR_DIR
$JAVA $JAVA_OPTIONS --stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac

-- 
View this message in context: 
http://old.nabble.com/Stopping---Starting-tp26633950p26685498.html
Sent from the Solr - User mailing list archive at Nabble.com.



why no results?

2009-12-07 Thread regany

hi all - newbie solr question - I've indexed some documents and can search /
receive results using the following schema - BUT ONLY when searching on the
"id" field. If I try searching on the title, subtitle, body or text field I
receive NO results. Very confused. :confused: Can anyone see anything
obvious I'm doing wrong Regan.











 






 

 
 id

 
 text

 
 

 






-- 
View this message in context: 
http://old.nabble.com/why-no-results--tp26688249p26688249.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: why no results?

2009-12-07 Thread regany


Tom Hill-7 wrote:
> 
> That's a common one to get bit by. The string
> 


You lost me Tom? I Think your message got cut off. I'm guessing something to
do with the "string" type??
-- 
View this message in context: 
http://old.nabble.com/why-no-results--tp26688249p26688295.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: why no results?

2009-12-07 Thread regany


Tom Hill-7 wrote:
> 
> Try solr.TextField instead.
> 


Thanks Tom,

I've replaced the  section above with...






deleted my index, restarted Solr and re-indexed my documents - but the
search still returns nothing.

Do I need to change the type in the  sections as well?

regan
-- 
View this message in context: 
http://old.nabble.com/why-no-results--tp26688249p26688469.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Apache solr for multiple searches

2009-12-08 Thread regany


Bhuvi HN wrote:
> 
> Can we have one single instance of the Apache Solr running for both the
> search like Job search and resume search.
> 

Yes, you want to run a multicore (multiple index) setup - see:
http://wiki.apache.org/solr/CoreAdmin


-- 
View this message in context: 
http://old.nabble.com/Apache-solr-for-multiple-searches-tp26551563p26690643.html
Sent from the Solr - User mailing list archive at Nabble.com.



do copyField's need to exist as Fields?

2009-12-08 Thread regany

Hello!

(solr newbie alert)

I want to pass 4 fields into Solr

1. id (unique)
2. title
3. subtitle
4. body

but only want to index and store 2:

1. id (unique)
2. text (copyField of id, title, subtitle, body).

The search then searches on "text", and returns only matching "id's".

When I set up the 2 fields, and the copyFields, it doesn't seem to work. I'm
guessing for a copyField to work you need to have fields with the same name
already set.

Is there a different way I should be setting it up to achieve the above??

regan
-- 
View this message in context: 
http://old.nabble.com/do-copyField%27s-need-to-exist-as-Fields--tp26701706p26701706.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: do copyField's need to exist as Fields?

2009-12-08 Thread regany


regany wrote:
> 
> Is there a different way I should be setting it up to achieve the above??
> 


Think I figured it out.

I set up the  so they are present, but get ignored accept for the
"text" field which gets indexed...







and then copyField the first 4 fields to the "text" field:







Seems to be working!? :drunk:
-- 
View this message in context: 
http://old.nabble.com/do-copyField%27s-need-to-exist-as-Fields--tp26701706p26702224.html
Sent from the Solr - User mailing list archive at Nabble.com.



Solr usage with Auctions/Classifieds?

2009-12-08 Thread regany

hello!

just wondering if anyone is using Solr as their search for an auction /
classified site, and if so how have you managed your setup in general? ie.
searching against listings that may have expired etc.

regan
-- 
View this message in context: 
http://old.nabble.com/Solr-usage-with-Auctions-Classifieds--tp26702828p26702828.html
Sent from the Solr - User mailing list archive at Nabble.com.



bool default - if missing when "updating" uses current or default value?

2009-12-08 Thread regany

hello,

if I have a booleen fieldType (solr.BoolField) with a default value of
"true", and I insert a new document I understand that the booleen value will
be set to TRUE.

But if I update an existing document, and I don't pass in a value for the
booleen field, will Solr keep the existing booleen value unchanged, or will
it update the booleen value again using the default? - ie. true.

?

regan
-- 
View this message in context: 
http://old.nabble.com/bool-default---if-missing-when-%22updating%22-uses-current-or-default-value--tp26703630p26703630.html
Sent from the Solr - User mailing list archive at Nabble.com.



SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server'

2009-12-11 Thread regany

hi, I've (hopefully correctly) install the solr php extension.

But I'm receiving the following error when trying to run my test script:

SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server'

Any ideas how to figure out why it's giving the error??

regan


 SOLR_SERVER_HOSTNAME
,'port' => SOLR_SERVER_PORT
,'path' => SOLR_SERVER_PATH

);

$client = new SolrClient($options);
$query = new SolrQuery();
$query->setQuery('apple');
$query->setStart(0);
$query->setRows(50);
$query_response = $client->Query($query);
print_r($query_response);
$respose = $query_response->getResponse();
print_r($response);

?>


-- 
View this message in context: 
http://old.nabble.com/SolrClient%3A%3Aquery%28%29%3A-Solr-HTTP-Error-%3A-%27Couldn%27t-connect-to-server%27-tp26742899p26742899.html
Sent from the Solr - User mailing list archive at Nabble.com.



Sol server is not set up ??

2009-12-11 Thread regany

Hello!

I'm trying to successfully build/install the PHP Solr Extension, but am
running into an error when doing a "make test" - the following 4 tests fail,
the other 17 pass. The Solr server is definately running because I can
access it via the admin URL. Anyone know what else may be causing the make
test to think teh solr server is not set up???

regan

=
Running selected tests.
TEST 1/21 [tests/solrclient_001.phpt]
SKIP SolrClient::addDocument() - Sending a single document to the Solr
server [tests/solrclient_001.phpt] reason: Solr server is not set up
TEST 2/21 [tests/solrclient_002.phpt]
SKIP SolrClient::addDocuments() - sending multiple documents to the Solr
server [tests/solrclient_002.phpt] reason: Solr server is not set up
TEST 3/21 [tests/solrclient_003.phpt]
SKIP SolrClient::addDocuments() - sending a cloned document
[tests/solrclient_003.phpt] reason: Solr server is not set up
TEST 4/21 [tests/solrclient_004.phpt]
SKIP SolrClient::query() - Sending a chained query request
[tests/solrclient_004.phpt] reason: Solr server is not set up
-- 
View this message in context: 
http://old.nabble.com/Sol-server-is-not-set-uptp26743824p26743824.html
Sent from the Solr - User mailing list archive at Nabble.com.



auto-starting Solr on OS X ?

2009-12-11 Thread regany

hello!

does anyone know how you go about setting up Solr so it auto starts after a
reboot etc on OS X?

thanks,

regan


-- 
View this message in context: 
http://old.nabble.com/auto-starting-Solr-on-OS-X---tp26753997p26753997.html
Sent from the Solr - User mailing list archive at Nabble.com.



Anyone using Solr PHP extension on OS X?

2009-12-12 Thread regany

Just wondering if anyone has successfully installed the Solr PHP extension on
OS X?

I've got OS X Server 10.4.11 and specifically wanted to know if anyone has
got the Solr PHP extension to work with the "standard" apple install of
Java.

Then I'll know if I've got a config problem or need to install Tomcat. :)

Thanks,

Regan
-- 
View this message in context: 
http://old.nabble.com/Anyone-using-Solr-PHP-extension-on-OS-X--tp26763185p26763185.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: I cant get it to work

2009-12-15 Thread regany


I've only just started with Solr too.

As a newbie, first I'd say forget about trying to "compare" it to your mysql
database.

It's completely different and performs it's own job in it's own way. You
feed a document in, and you store that information in the most efficient
manner you can to perform the search and return the results you want.

So ask, what do I want to search against?

field1
field2
field3

That's what you "feed" into Solr.

Then ask, what information do I want to "return" after a search? This
determines how you "store" the information you've just "fed" into Solr. Say
you want to return:

field2

Then you might accept field1, field2, and field3 and merge them together
into 1 searchable field called "searchtext". This is what users will search
against. Then you'd also have "field2" as another field.

field2 (not indexed, stored)
searchtext (combination of field1,field2,field2 - indexed, not stored)

So then you could search against "searchtext" and return "field2" as the
result.

Hope that provides some explanation (I know it's basic). From my very
limited experience with, Solr is great. My biggest hurdle was getting my
head around the fact that it's NOT a relational database (ie. mysql) but a
separate tool that you configure  in the best way for your "search" and only
that.
-- 
View this message in context: 
http://old.nabble.com/I-cant-get-it-to-work-tp26791099p26792373.html
Sent from the Solr - User mailing list archive at Nabble.com.