Re: i wanna change response type to PHP serialize

2007-06-26 Thread Nick Jenkin

I have some good news :o)

https://issues.apache.org/jira/browse/SOLR-275

Please let me know if you find any bugs
Thanks
-Nick

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:

I think it simple to u.

so i wait for ur good news.

2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
>
> I am also quite interested in getting a serialized PHP array response
> writer, after some investigation it doesn't seem as difficult as I
> first thought, I will have a try at implementing this when I get some
> time, the format of the array would probably end up being the same as
> if you were to use json_decode.
> -Nick
>
> On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > I am also looking for a PHP response writer that outputs serialized PHP
> > code, I've taken a look at
> > SOLR-196but it's not
> > quite what I need.  Unless anyone else has started implementing
> > one, I will see if I can modify Paul's patch to do the task.
> >
> > cheers,
> > Tristan
> >
> >
> >
> > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > >
> > > My experience tells me that serializing/unserializing tends to be
> faster
> > > than eval(), especially on larger arrays.  I've looked at the code,
> trying
> > > to put together a PHP serialized array output type, but haven't had
> > > success
> > > doing it yet.  If I do, it'll be contributed back, but until someone
> does
> > > that version, the way Nick suggests is probably the only option.
> > >
> > >
> > > On 6/25/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi James
> > > > I think you would be better of outputting an PHP array, and running
> > > > eval() over it, the PHP serialize format is quite complicated.
> > > >
> > > > On that note, you might be interested in:
> > > > http://issues.apache.org/jira/browse/SOLR-196
> > > > -Nick
> > > >
> > > > On 6/25/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > which files i should change from source?
> > > > >
> > > > > and if i change ok.
> > > > >
> > > > > how to compile? just ant dist?
> > > > >
> > > > > --
> > > > > regards
> > > > > jl
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Michael Kimsal
> > > http://webdevradio.com
> > >
> >
>



--
regards
jl



Re: i wanna change response type to PHP serialize

2007-06-26 Thread James liu

i just cp it to src\java\org\apache\solr\request and ant dist...i think
maybe my method is wrong.

same error infromation...

java.lang.NoClassDefFoundError: org/apache/solr/search/ScorePriorityQueue
at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:886)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:805)
at 
org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:698)
at 
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardRequestHandler.java:122)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Unknown Source)




2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:


I have some good news :o)

https://issues.apache.org/jira/browse/SOLR-275

Please let me know if you find any bugs
Thanks
-Nick

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> I think it simple to u.
>
> so i wait for ur good news.
>
> 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> >
> > I am also quite interested in getting a serialized PHP array response
> > writer, after some investigation it doesn't seem as difficult as I
> > first thought, I will have a try at implementing this when I get some
> > time, the format of the array would probably end up being the same as
> > if you were to use json_decode.
> > -Nick
> >
> > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > I am also looking for a PHP response writer that outputs serialized
PHP
> > > code, I've taken a look at
> > > SOLR-196but it's not
> > > quite what I need.  Unless anyone else has started implementing
> > > one, I will see if I can modify Paul's patch to do the task.
> > >
> > > cheers,
> > > Tristan
> > >
> > >
> > >
> > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > >
> > > > My experience tells me that serializing/unserializing tends to be
> > faster
> > > > than eval(), especially on larger arrays.  I've looked at the
code,
> > trying
> > > > to put together a PHP serialized array output type, but haven't
had
> > > > success
> > > > doing it yet.  If I do, it'll be contributed back, but until
someone
> > does
> > > > that version, the way Nick suggests is probably the only option.
> > > >
> > > >
> > > > On 6/25/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi James
> > > > > I think you would be better of outputting an PHP array, and
running
> > > > > eval() over it, the PHP serialize format is quite complicated.
> > > > >
> > > > > On that note, you might be interested in:
> > > > > http://issues.apache.org/jira/browse/SOLR-196
> > > > > -Nick
> > > > >
> > > > > On 6/25/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > > which files i should change from source?
> > > > > >
> > > > > > and if i change ok.
> > > > > >
> > > > > > how to compile? just ant dist?
> > > > > >
> > > > > > --
> > > > > > regards
> > > > > > jl
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Michael Kimsal
> > > > http://webdevradio.com
> > > >
> > >
> >
>
>
>
> --
> regards
> jl
>





--
regards
jl


Re: i wanna change response type to PHP serialize

2007-06-26 Thread Nick Jenkin

Interesting, what version of solr are you using, I tested on 1.2.
-Nick

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:

i just cp it to src\java\org\apache\solr\request and ant dist...i think
maybe my method is wrong.

same error infromation...

java.lang.NoClassDefFoundError: org/apache/solr/search/ScorePriorityQueue
at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:886)
at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:805)
at 
org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:698)
at 
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardRequestHandler.java:122)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Unknown Source)




2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
>
> I have some good news :o)
>
> https://issues.apache.org/jira/browse/SOLR-275
>
> Please let me know if you find any bugs
> Thanks
> -Nick
>
> On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > I think it simple to u.
> >
> > so i wait for ur good news.
> >
> > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > >
> > > I am also quite interested in getting a serialized PHP array response
> > > writer, after some investigation it doesn't seem as difficult as I
> > > first thought, I will have a try at implementing this when I get some
> > > time, the format of the array would probably end up being the same as
> > > if you were to use json_decode.
> > > -Nick
> > >
> > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > > I am also looking for a PHP response writer that outputs serialized
> PHP
> > > > code, I've taken a look at
> > > > SOLR-196but it's not
> > > > quite what I need.  Unless anyone else has started implementing
> > > > one, I will see if I can modify Paul's patch to do the task.
> > > >
> > > > cheers,
> > > > Tristan
> > > >
> > > >
> > > >
> > > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > My experience tells me that serializing/unserializing tends to be
> > > faster
> > > > > than eval(), especially on larger arrays.  I've looked at the
> code,
> > > trying
> > > > > to put together a PHP serialized array output type, but haven't
> had
> > > > > success
> > > > > doing it yet.  If I do, it'll be contributed back, but until
> someone
> > > does
> > > > > that version, the way Nick suggests is probably the only option.
> > > > >
> > > > >
> > > > > On 6/25/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Hi James
> > > > > > I think you would be better of outputting an PHP array, and
> running
> > > > > > eval() over it, the PHP serialize format is quite complicated.
> > > > > >
> > > > > > On that note, you might be interested in:
> > > > > > http://issues.apache.org/jira/browse/SOLR-196
> > > > > > -Nick
> > > > > >
> > > > > > On 6/25/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > > > which files i should change from source?
> > > > > > >
> > > > > > > and if i change ok.
> > > > > > >
> > > > > > > how to compile? just ant dist?
> > > > > > >
> > > > > > > --
> > > > > > > regards
> > > > > > > jl
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Michae

Re: i wanna change response type to PHP serialize

2007-06-26 Thread Nick Jenkin

Hey James,
The error you posted is the same you posted above in a previous email,
could it be something else?
-Nick
On 6/26/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:

Interesting, what version of solr are you using, I tested on 1.2.
-Nick

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> i just cp it to src\java\org\apache\solr\request and ant dist...i think
> maybe my method is wrong.
>
> same error infromation...
>
> java.lang.NoClassDefFoundError: org/apache/solr/search/ScorePriorityQueue
> at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:886)
> at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:805)
> at 
org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:698)
> at 
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardRequestHandler.java:122)
> at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:66)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:185)
> at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> at java.lang.Thread.run(Unknown Source)
>
>
>
>
> 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> >
> > I have some good news :o)
> >
> > https://issues.apache.org/jira/browse/SOLR-275
> >
> > Please let me know if you find any bugs
> > Thanks
> > -Nick
> >
> > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > I think it simple to u.
> > >
> > > so i wait for ur good news.
> > >
> > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > >
> > > > I am also quite interested in getting a serialized PHP array response
> > > > writer, after some investigation it doesn't seem as difficult as I
> > > > first thought, I will have a try at implementing this when I get some
> > > > time, the format of the array would probably end up being the same as
> > > > if you were to use json_decode.
> > > > -Nick
> > > >
> > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > > > I am also looking for a PHP response writer that outputs serialized
> > PHP
> > > > > code, I've taken a look at
> > > > > SOLR-196but it's not
> > > > > quite what I need.  Unless anyone else has started implementing
> > > > > one, I will see if I can modify Paul's patch to do the task.
> > > > >
> > > > > cheers,
> > > > > Tristan
> > > > >
> > > > >
> > > > >
> > > > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > My experience tells me that serializing/unserializing tends to be
> > > > faster
> > > > > > than eval(), especially on larger arrays.  I've looked at the
> > code,
> > > > trying
> > > > > > to put together a PHP serialized array output type, but haven't
> > had
> > > > > > success
> > > > > > doing it yet.  If I do, it'll be contributed back, but until
> > someone
> > > > does
> > > > > > that version, the way Nick suggests is probably the only option.
> > > > > >
> > > > > >
> > > > > > On 6/25/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Hi James
> > > > > > > I think you would be better of outputting an PHP array, and
> > running
> > > > > > > eval() over it, the PHP serialize format is quite complicated.
> > > > > > >
> > > > > > > On that note, you might be interested in:
> > > > > > > http://issues.apache.org/jira/browse/SOLR-196
> > > > > > > -Nick
> > > > > > >
> > > > > > > On 6/25

Re: Solr - autocommit params

2007-06-26 Thread Daniel Alheiros
Thanks Mike.

Regards,
Daniel Alheiros


On 25/6/07 20:15, "Mike Klaas" <[EMAIL PROTECTED]> wrote:

> On 25-Jun-07, at 8:02 AM, Daniel Alheiros wrote:
>> I've configured my Solr instance using autocommit in the following
>> way:
>> 
>> 
>> 
>> 1000 
>> 6
>> 
>> But it¹s only considering the maxtime now. I¹ve used the maxdocs
>> before and
>> it worked, but after I defined both, only the maxtime is being
>> considered.
>> 
>> Is it a known bug of 1.2 release?
> 
> FYI, this is now fixed in trunk.
> 
> best,
> -Mike


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.



Re: add CJKTokenizer to solr

2007-06-26 Thread Daniel Alheiros
Hi Hoss.

Yes, it's the tricky part when re-structuring configs...

One possible solution is, when you create a new schema, you offer a
conversion tool... Other is to define a "version" on the config and
depending on the version, the expected structure will be different.

I'm sure you know this all, but in terms of benefits, I think it may be a
bit more straightforward as the terms will match the class purposes.

But of course, if I'm the only one that think this way, it's far away from
turning into a priority, so just ignore...

Regards,
Daniel


On 25/6/07 21:43, "Chris Hostetter" <[EMAIL PROTECTED]> wrote:

> 
> : 
> :
> : I think this way, the config terms are a bit clearer... What do you think?
> 
> in general, do i think it would be better if the  and 
> declarations used "factory" as the attribute instead of "class"? ...yes.
> 
> So i think it makes sense to change this now? ... i don't know.
> 
> the backward compatibiily issues are tricky ... not from an implementation
> standpoint, but from a clarify standpoint.
> 
> we could always make hte schema.xml parsing code say that  and
>  declarations will first be checked for a "factory' attribute,
> and if it's found use that class, if it's not found then revert to the
> "legacy" behavior of looking for a "class" attribute ... but that means
> that as people with existing schemas start to take advantage of newer
> factories like the ReflectionFactory, and maybe cut/paste examples
> from other configs, they'll start to have a hodgepodge of syntax...
> 
>   
>  yadayadaydad="false" numOption="42" />
>   
>   
>   
> 
> ...i don't know that the "clarity" a "factory" attribute would add for new
> users would balance out the confusion this might cause to existing users.
> 
> 
> -Hoss
> 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.



Re: Benefit of schema

2007-06-26 Thread Paul Battley

On 23/06/07, Erik Hatcher <[EMAIL PROTECTED]> wrote:

It's nice to have known straightforward field names for querying, like:

title:"web development" AND author:kimsal

With wildcarded fields, you won't end up with such clean field names.


Actually, you can use clean wildcarded names as long they are all the
same type, e.g.



Paul.


RE: I'm using PHP curl post xml command to Solr,Is it the only way to post data?

2007-06-26 Thread Kijiji Xu, Ping
I had solved this problem,below is my POST code,I used HTTP_Request of 
PEAR,it’s so simple.thank you all very much .FYI;


private function doPost($url,$postData){
 $req = &new HTTP_Request($url,array(
'method' => HTTP_REQUEST_METHOD_POST,
'http' => HTTP_REQUEST_HTTP_VER_1_1));
 $req->addHeader('Content-Type','text/xml; charset=utf-8');
 $req->addHeader('Content-Length',strlen($postData));
 $req->addRawPostData($postData,true);
 $req->sendRequest();
 $response1 = $req->getResponseBody();
 echo $response1."\n";
 return $response1;
}


-Original Message-
From: Tristan Vittorio [mailto:[EMAIL PROTECTED] 
Sent: 2007年6月25日 21:36
To: solr-user@lucene.apache.org
Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only way to 
post data?

Rather than re-inventing the wheel with fsockopen, why don't you use an
existing HTTP client implementation written in PHP:

http://pear.php.net/package/HTTP_Client
http://framework.zend.com/manual/en/zend.http.html
http://scripts.incutio.com/httpclient/
http://www.phpclasses.org/browse/package/576.html

They should all be able to perform the HTTP POST requests that you require
and will be a lot easier to use that writing raw HTTP protocol through a
socket!

regards,
Tristan



On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
>
> In our product environment, there haven't curl and pecl lib,so...
> If the fsockopen could solve post xml data,I would like to use it.And I
> tried it, but I failed.
>
> -Original Message-
> From: Michael Kimsal [mailto:[EMAIL PROTECTED]
> Sent: 2007年6月25日 20:16
> To: solr-user@lucene.apache.org
> Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only
> way to post data?
>
> Using PHP5 (5.1 or higher I think)
> http://us.php.net/manual/en/function.http-post-fields.php
> is available.
>
> From the example on that page:
>
> $fields = array(
> 'name' => 'mike',
> 'pass' => 'passwordt'
> );
> $response = http_post_fields("http://www.example.com/";, $fields);
>
>
> Looks pretty simple, but I haven't tried it yet.
>
> On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
> >
> > What about fsockopen, Or any other simple method?
> >
> >
> >
> > Thanks
> >
> >
> >
> > --
> >
> > Regards
> >
> > Xp from china
> >
> >
>
>
> --
> Michael Kimsal
> http://webdevradio.com
>


delete by query multiple Ids

2007-06-26 Thread michael ravits
hello solrs
   
  is it possible to query multiple specific ids?
  something like this:
   
  mediaId:6720,6721,6722,8762,9754

   
-
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. 

Re: delete by query multiple Ids

2007-06-26 Thread Erik Hatcher


On Jun 26, 2007, at 6:46 AM, michael ravits wrote:

hello solrs

  is it possible to query multiple specific ids?
  something like this:

  mediaId:6720,6721,6722,8762,9754


sure, but you need to use proper query parser syntax:

mediaId:(6720 OR 6721 OR  )




multiple indices

2007-06-26 Thread michael ravits
dear solrs - thanks for all your help.
   
  I have multiple applications (blogs/forums/video/etc) - each of these is 
independent (no need to perform queries on multiple indices).
  Would it be best to use multiple instances of SOLR/JVM - one for each index 
or use a solution where only one JVM instance is running (maybe solr-215?)?
   
  Considering mostly performance and load on the servers.

   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

Re: i wanna change response type to PHP serialize

2007-06-26 Thread Tristan Vittorio

Thanks Nick for you original version of the PHPResponseWriter class, I've
submitted an updated version of your class
https://issues.apache.org/jira/browse/SOLR-275 which compiles in the current
svn trunk and fixed a small bug when "score" is not included in the return
field list.

cheers,
Tristan



On 6/26/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:


Hey James,
The error you posted is the same you posted above in a previous email,
could it be something else?
-Nick
On 6/26/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> Interesting, what version of solr are you using, I tested on 1.2.
> -Nick
>
> On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > i just cp it to src\java\org\apache\solr\request and ant dist...i
think
> > maybe my method is wrong.
> >
> > same error infromation...
> >
> > java.lang.NoClassDefFoundError:
org/apache/solr/search/ScorePriorityQueue
> > at org.apache.solr.search.SolrIndexSearcher.getDocListNC(
SolrIndexSearcher.java:886)
> > at org.apache.solr.search.SolrIndexSearcher.getDocListC(
SolrIndexSearcher.java:805)
> > at org.apache.solr.search.SolrIndexSearcher.getDocList(
SolrIndexSearcher.java:698)
> > at
org.apache.solr.request.StandardRequestHandler.handleRequestBody(
StandardRequestHandler.java:122)
> > at org.apache.solr.handler.RequestHandlerBase.handleRequest(
RequestHandlerBase.java:77)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> > at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java
:66)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java
:690)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java
:803)
> > at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:290)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
> > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
SolrDispatchFilter.java:185)
> > at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
> > at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:228)
> > at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:175)
> > at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:128)
> > at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:104)
> > at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:109)
> > at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:216)
> > at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:844)
> > at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:634)
> > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
JIoEndpoint.java:445)
> > at java.lang.Thread.run(Unknown Source)
> >
> >
> >
> >
> > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > >
> > > I have some good news :o)
> > >
> > > https://issues.apache.org/jira/browse/SOLR-275
> > >
> > > Please let me know if you find any bugs
> > > Thanks
> > > -Nick
> > >
> > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > I think it simple to u.
> > > >
> > > > so i wait for ur good news.
> > > >
> > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > >
> > > > > I am also quite interested in getting a serialized PHP array
response
> > > > > writer, after some investigation it doesn't seem as difficult as
I
> > > > > first thought, I will have a try at implementing this when I get
some
> > > > > time, the format of the array would probably end up being the
same as
> > > > > if you were to use json_decode.
> > > > > -Nick
> > > > >
> > > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > > > > I am also looking for a PHP response writer that outputs
serialized
> > > PHP
> > > > > > code, I've taken a look at
> > > > > > SOLR-196but
it's not
> > > > > > quite what I need.  Unless anyone else has started
implementing
> > > > > > one, I will see if I can modify Paul's patch to do the task.
> > > > > >
> > > > > > cheers,
> > > > > > Tristan
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > My experience tells me that serializing/unserializing tends
to be
> > > > > faster
> > > > > > > than eval(), especially on larger arrays.  I've looked at
the
> > > code,
> > > > > trying
> > > > > > > to put together a PHP serialized array output type, but
haven't
> > > had
> > > > > > > success
> > > > > > > doing it yet.  If I do, it'll be contributed back, but until
> > > someone
> > > > > does
> > > > > > > that

Re: multiple indices

2007-06-26 Thread Otis Gospodnetic
I would use SOLR-215 instead of running multiple instances on the same box.

Otis
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share

- Original Message 
From: michael ravits <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, June 26, 2007 3:57:12 PM
Subject: multiple indices

dear solrs - thanks for all your help.
   
  I have multiple applications (blogs/forums/video/etc) - each of these is 
independent (no need to perform queries on multiple indices).
  Would it be best to use multiple instances of SOLR/JVM - one for each index 
or use a solution where only one JVM instance is running (maybe solr-215?)?
   
  Considering mostly performance and load on the servers.

   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 




How to use bit fields to narrow a search

2007-06-26 Thread Siegfried Goeschl

Hi folks,

I'm currently evaluating SOLR to implement fulltext search and within 8
hours I have my content imported and able to benchmark the queries ... :-)

As a beginner with Lucence/SOLR I have a problem where to add my
"special features" - little bit overloaded with "Lucene in Action" and 
SOLR over the weekend ...


Some background ...

+) I have 4 millions document indexed
+) each document has 3 long variables (stored but not indexed)
representing a 64 bit mask each
+) I have to filter the Hits based on the bit mask using BIT AND with
application supplied parameters

Any suggestions/ideas where to add this processing within SOLR ...

Thanks in advance

Siegfried Goeschl





Re: How to use bit fields to narrow a search

2007-06-26 Thread Yonik Seeley

On 6/26/07, Siegfried Goeschl <[EMAIL PROTECTED]> wrote:

Hi folks,

I'm currently evaluating SOLR to implement fulltext search and within 8
hours I have my content imported and able to benchmark the queries ... :-)

As a beginner with Lucence/SOLR I have a problem where to add my
"special features" - little bit overloaded with "Lucene in Action" and
SOLR over the weekend ...

Some background ...

+) I have 4 millions document indexed
+) each document has 3 long variables (stored but not indexed)
representing a 64 bit mask each
+) I have to filter the Hits based on the bit mask using BIT AND with
application supplied parameters

Any suggestions/ideas where to add this processing within SOLR ...


Due to the nature of an inverted index, it could actually be more
efficient to store the bits separately.  You could also then use Solr
w/o any custom java code.

Index a field called bits, which just contains the bit numbers set,
separated by whitespace.
At query time, use filters on the required bit numbers:
q=foo&fq=bits:12&fq=bits:45

-Yonik


Re: How to use bit fields to narrow a search

2007-06-26 Thread Siegfried Goeschl

Hi Yonik,

looks intersting - I give it a try 

Cheers,

Siegfried Goeschl

Yonik Seeley wrote:

On 6/26/07, Siegfried Goeschl <[EMAIL PROTECTED]> wrote:

Hi folks,

I'm currently evaluating SOLR to implement fulltext search and within 8
hours I have my content imported and able to benchmark the queries ... 
:-)


As a beginner with Lucence/SOLR I have a problem where to add my
"special features" - little bit overloaded with "Lucene in Action" and
SOLR over the weekend ...

Some background ...

+) I have 4 millions document indexed
+) each document has 3 long variables (stored but not indexed)
representing a 64 bit mask each
+) I have to filter the Hits based on the bit mask using BIT AND with
application supplied parameters

Any suggestions/ideas where to add this processing within SOLR ...


Due to the nature of an inverted index, it could actually be more
efficient to store the bits separately.  You could also then use Solr
w/o any custom java code.

Index a field called bits, which just contains the bit numbers set,
separated by whitespace.
At query time, use filters on the required bit numbers:
q=foo&fq=bits:12&fq=bits:45

-Yonik




XML vs JSON writer performance issues

2007-06-26 Thread Jérôme Etévé

Hi all.
 I'm currently running some tests with solr on a small index and I
noticed a big difference on the response time of queries depending on
the use of XML or json as a response format.
In average, my test queries (including http connections open and close
) takes 6 ms to perform when I ask for XML and they take 30 ms when I
ask for JSON.
When I'm running lots of test clients at the same time, the same
factor 30/6 seems to apply.

I looked at the code and didn't see any major difference between the
two writers.
I'd rather use json instead of XML, but that performance issue prevents me to.

I'm using  apache-solr-1.2.0 / apache-tomcat-6.0.13 / java version
"1.5.0_09" (Sun)

Thanks for any comments or help.

--
Jerome Eteve.
[EMAIL PROTECTED]
http://www.eteve.net


Re: XML vs JSON writer performance issues

2007-06-26 Thread Yonik Seeley

On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:

  I'm currently running some tests with solr on a small index and I
noticed a big difference on the response time of queries depending on
the use of XML or json as a response format.
In average, my test queries (including http connections open and close
) takes 6 ms to perform when I ask for XML and they take 30 ms when I
ask for JSON.


Wow, that's a surprise.
The only thing I can figure is that perhaps during the string escaping
the JSON writer is writing to the stream character-by-character.
Could you try the python writer and see if there is a speed
difference?  It uses a StringBuilder when escaping the string.

-Yonik


Re: XML vs JSON writer performance issues

2007-06-26 Thread Jérôme Etévé

On 6/26/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:

On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:
>   I'm currently running some tests with solr on a small index and I
> noticed a big difference on the response time of queries depending on
> the use of XML or json as a response format.
> In average, my test queries (including http connections open and close
> ) takes 6 ms to perform when I ask for XML and they take 30 ms when I
> ask for JSON.

Wow, that's a surprise.
The only thing I can figure is that perhaps during the string escaping
the JSON writer is writing to the stream character-by-character.
Could you try the python writer and see if there is a speed
difference?  It uses a StringBuilder when escaping the string.


I just tried the python writer and it's as fast as XML is.  I'm still
looking at the code trying to point out the reason of that.
Thanks for any help.

J

--
Jerome Eteve.
[EMAIL PROTECTED]
http://www.eteve.net


Re: Does sort field need have to be 'store'?

2007-06-26 Thread Mike Klaas

On 25-Jun-07, at 10:53 PM, James liu wrote:



[quote]how can i use index all with ram and how to config which ram  
i should

use?[/quote]


Your os will automatically load the most frequently-used parts of the  
index in ram.  If your total ram is at least as large as the total  
JVM heap size plus the on-disk footprint of the index, it will  
eventually reside completely in memory (assuming no other processes  
are using ram).


I don't understand your second question.

-MIke


Re: XML vs JSON writer performance issues

2007-06-26 Thread Yonik Seeley

On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:

I just tried the python writer and it's as fast as XML is.  I'm still
looking at the code trying to point out the reason of that.
Thanks for any help.


It's Java's braindead Reader/Writer implementations.  If you want
really good performance, one is forced to do their own buffering, even
for a BufferedWriter (I assume the PrintWriter obtained from
ServletResponse.getWriter() is buffered).

-Yonik


Re: multiple indices

2007-06-26 Thread Chris Hostetter

:   I have multiple applications (blogs/forums/video/etc) - each of these
: is independent (no need to perform queries on multiple indices).

:   Would it be best to use multiple instances of SOLR/JVM - one for each
: index or use a solution where only one JVM instance is running (maybe
: solr-215?)?


you don't actaully need multiple JVM instances to run multiple Solr
instance ... you can configure your ServletContainer to run the solr.war
in multiple contexts each of which has a differnet solrconfig.xml and
schema.xml (using JNDI) ... that way you get most of hte benefits of
isolated instances but also can also take advantage of a single large heap
and common connection management.




-Hoss



Re: add CJKTokenizer to solr

2007-06-26 Thread Chris Hostetter

: conversion tool... Other is to define a "version" on the config and
: depending on the version, the expected structure will be different.

FYI: schema.xml does have this ... it's one of hte ,schema> attributes.

we've only ever reved it once when multiValue fields were added because we
wanted to preserve backwards compatibility for old schemas that expected
all fields to be multie valued, but it *really* didnt' make sense for
that to be the default moving forward.

I'm not sure a schema syntax version bump is really waranted just to
chnage "class"=>"factory" in tokenizer/filter declarations .. especially
since the main motivation is a ReflectTokenFilterFactory that we would
probably recommend against using "in production" for performance reasons.




-Hoss



Re: XML vs JSON writer performance issues

2007-06-26 Thread Yonik Seeley

It would be helpful if you could try out the patch at
https://issues.apache.org/jira/browse/SOLR-276

-Yonik


On 6/26/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:

On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:
> I just tried the python writer and it's as fast as XML is.  I'm still
> looking at the code trying to point out the reason of that.
> Thanks for any help.

It's Java's braindead Reader/Writer implementations.  If you want
really good performance, one is forced to do their own buffering, even
for a BufferedWriter (I assume the PrintWriter obtained from
ServletResponse.getWriter() is buffered).

-Yonik



solrj and appending to existing index

2007-06-26 Thread Otis Gospodnetic
Hi,

I took a quick look at solrj.  One thing I didn't find is a way to add 
documents to an existing index without overwriting the index.  I looked at the 
sources and the unit tests, but didn't spot the "append modus operandi".  Ryan, 
or somebody, where should I look?

Thanks,
Otis




Re: solrj and appending to existing index

2007-06-26 Thread Brian Whitman




On Jun 26, 2007, at 4:11 PM, Otis Gospodnetic wrote:


Hi,

I took a quick look at solrj.  One thing I didn't find is a way to  
add documents to an existing index without overwriting the index.   
I looked at the sources and the unit tests, but didn't spot the  
"append modus operandi".  Ryan, or somebody, where should I look?





I may be misunderstanding, but I use solrj on an existing index all  
the time. I just


solr = new CommonsHttpSolrServer(new URL(url));

and then

SimpleSolrDoc solrDoc = new SimpleSolrDoc();
solrDoc.addField(field.name(), field.stringValue());
solr.add(solrDoc);


The indexes in question were created by 'normal solr' and don't get  
overwritten.





RE: solrj and appending to existing index

2007-06-26 Thread Will Johnson
If you create a SolrServer and start adding documents you are updating
the index with new documents.  If you're id's happen to collide with
ones in the index then you will overwrite those documents but that's the
only way you could end up with less than existing docs + docs added. 

- will

-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 4:12 PM
To: solr-user@lucene.apache.org
Subject: solrj and appending to existing index

Hi,

I took a quick look at solrj.  One thing I didn't find is a way to add
documents to an existing index without overwriting the index.  I looked
at the sources and the unit tests, but didn't spot the "append modus
operandi".  Ryan, or somebody, where should I look?

Thanks,
Otis




RE: solrj and appending to existing index

2007-06-26 Thread Will Johnson
I just spotted one thing looking at the unit test
org.apache.solr.client.solrj.SolrExampleTestBase

SolrServer server = getSolrServer();
// Empty the database...
server.deleteByQuery( "*:*" );// delete everything!

This is here purely for testing purposes and only so that we know what
is in the index prior to running the rest of the tests (namely nothing).
It's not at all required and probably not really recommended as a best
practice. :)

- will



-Original Message-
From: Will Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 4:16 PM
To: solr-user@lucene.apache.org
Subject: RE: solrj and appending to existing index

If you create a SolrServer and start adding documents you are updating
the index with new documents.  If you're id's happen to collide with
ones in the index then you will overwrite those documents but that's the
only way you could end up with less than existing docs + docs added. 

- will

-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 4:12 PM
To: solr-user@lucene.apache.org
Subject: solrj and appending to existing index

Hi,

I took a quick look at solrj.  One thing I didn't find is a way to add
documents to an existing index without overwriting the index.  I looked
at the sources and the unit tests, but didn't spot the "append modus
operandi".  Ryan, or somebody, where should I look?

Thanks,
Otis




Re: solrj and appending to existing index

2007-06-26 Thread Otis Gospodnetic
Aha, maybe that is what happened, thanks!
So this means there is no "switch" for "clear the index first" as there is with 
Lucene's IndexWriter, for example.  An explicit server.deleteByQuery( "*:*" ); 
is needed.

Otis

- Original Message 
From: Will Johnson <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, June 26, 2007 10:16:22 PM
Subject: RE: solrj and appending to existing index

If you create a SolrServer and start adding documents you are updating
the index with new documents.  If you're id's happen to collide with
ones in the index then you will overwrite those documents but that's the
only way you could end up with less than existing docs + docs added. 

- will

-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 26, 2007 4:12 PM
To: solr-user@lucene.apache.org
Subject: solrj and appending to existing index

Hi,

I took a quick look at solrj.  One thing I didn't find is a way to add
documents to an existing index without overwriting the index.  I looked
at the sources and the unit tests, but didn't spot the "append modus
operandi".  Ryan, or somebody, where should I look?

Thanks,
Otis







Re: multiple indices

2007-06-26 Thread Otis Gospodnetic
Hm, that JNDI again... this makes it sound like SOLR-215 is completely 
superfluous?
I have not configured Jetty this way yet, but I do see some docs on 
http://wiki.apache.org/solr/SolrJetty .  Interestingly, the configs look a lot 
different than what's described on http://docs.codehaus.org/display/JETTY/JNDI 
.  I also remember Jetty Plus from a while back, but now I cannot find any 
information about Jetty Plus 6.*, only 5 - 
http://jetty.mortbay.org/jetty5/plus/index.html .

Otis



- Original Message 
From: Chris Hostetter <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, June 26, 2007 8:10:46 PM
Subject: Re: multiple indices


:   I have multiple applications (blogs/forums/video/etc) - each of these
: is independent (no need to perform queries on multiple indices).

:   Would it be best to use multiple instances of SOLR/JVM - one for each
: index or use a solution where only one JVM instance is running (maybe
: solr-215?)?


you don't actaully need multiple JVM instances to run multiple Solr
instance ... you can configure your ServletContainer to run the solr.war
in multiple contexts each of which has a differnet solrconfig.xml and
schema.xml (using JNDI) ... that way you get most of hte benefits of
isolated instances but also can also take advantage of a single large heap
and common connection management.




-Hoss






Dynamically calculated range facet

2007-06-26 Thread Martin Grotzke
Hi,

my documents (products) have a price field, and I want to have
a "dynamically" calculated range facet for that in the response.

E.g. I want to have this in the response
price:[* TO 20]  -> 23
price:[20 TO 40] -> 42
price:[40 TO *]  -> 33
if prices are between 0 and 60
but
price:[* TO 100]   -> 23
price:[100 TO 200] -> 42
price:[200 TO *]   -> 33
if prices are between 0 and 300

AFAICS I do not have the possibility to specify range queries in my
application, as I do not have a clue what's the lowest and highest
price in the search result and what are "good" ranges according
to the (statistical) distribution of prices in the search result.

So if it would be possible to go over each item in the search result
I could check the price field and define my ranges for the specific
query on solr side and return the price ranges as a facet.

Has anybody done s.th. like this before, or is there s.th. that I'm
missing and why this approach does not make sense at all?

Otherwise, what would be a good starting point to plug in such
functionality into solr?

Thanx a lot in advance,
cheers,
Martin


signature.asc
Description: This is a digitally signed message part


Re: Dynamically calculated range facet

2007-06-26 Thread Mike Klaas

On 26-Jun-07, at 3:01 PM, Martin Grotzke wrote:

AFAICS I do not have the possibility to specify range queries in my
application, as I do not have a clue what's the lowest and highest
price in the search result and what are "good" ranges according
to the (statistical) distribution of prices in the search result.

So if it would be possible to go over each item in the search result
I could check the price field and define my ranges for the specific
query on solr side and return the price ranges as a facet.

Has anybody done s.th. like this before, or is there s.th. that I'm
missing and why this approach does not make sense at all?

Otherwise, what would be a good starting point to plug in such
functionality into solr?


Easy: facet based on fixed ranges (say, every 10 dollars for x < 100,  
100 dollars for x < 1000, etc)., and combine them sensically on the  
client-side.  Requires no solr-side modification.


A bit harder: define your own request handler that loops over the  
documents after a search and samples the values of (say) the first 20  
docs (or more, but be sure to use the FieldCache if so).  Calculate  
your range queries, facets (code will be almost identical to the code  
in the builtin request handlers), and return the results.


cheers,
-Mike


snapshooter no go

2007-06-26 Thread Otis Gospodnetic
Hi,

Here is a puzzling one.  I can't get Solr to invoke snaphooter properly.  Solr 
claims my snapshooter is not where I said it is:

SEVERE: java.io.IOException: Cannot run program "snapshooter" (in
directory "solr/bin"): java.io.IOException: error=2, No such file or
directory


So I added some logging to RunExecutableListener:

INFO: CMD: snapshooter
INFO: ENV: MYVAR=val1
INFO: DIR: /foobar/jetty-6.1.3/solr/bin

This looks correct, and I can see snapshooter is there:

$ cd /foo/jetty-6.1.3
$ ls -al solr/bin/snapshooter
-rwxr-xr-x 1 otis otis 2624 Jun 20 02:53 solr/bin/snapshooter

So snapshooter *does* exist under /foobar/jetty-6.1.3/solr/bin and is 
executable by everyone.  I've tried moving solr home dir outside the jetty dir, 
but that made no difference.  I tried specifying the absolute path to the "dir" 
parameter in the config for snapshooter in solrconfig.xml, again no luck.

Huh?  Is this some new bug?  Has anyone seen this before?  I'm using the HEAD.

Thanks,
Otis




Re: snapshooter no go

2007-06-26 Thread James liu

first try it? which system u use?

if u use freebsd, just give up trying. it not fit for freebsd.


2007/6/27, Otis Gospodnetic <[EMAIL PROTECTED]>:


Hi,

Here is a puzzling one.  I can't get Solr to invoke snaphooter
properly.  Solr claims my snapshooter is not where I said it is:

SEVERE: java.io.IOException: Cannot run program "snapshooter" (in
directory "solr/bin"): java.io.IOException: error=2, No such file or
directory


So I added some logging to RunExecutableListener:

INFO: CMD: snapshooter
INFO: ENV: MYVAR=val1
INFO: DIR: /foobar/jetty-6.1.3/solr/bin

This looks correct, and I can see snapshooter is there:

$ cd /foo/jetty-6.1.3
$ ls -al solr/bin/snapshooter
-rwxr-xr-x 1 otis otis 2624 Jun 20 02:53 solr/bin/snapshooter

So snapshooter *does* exist under /foobar/jetty-6.1.3/solr/bin and is
executable by everyone.  I've tried moving solr home dir outside the jetty
dir, but that made no difference.  I tried specifying the absolute path to
the "dir" parameter in the config for snapshooter in solrconfig.xml, again
no luck.

Huh?  Is this some new bug?  Has anyone seen this before?  I'm using the
HEAD.

Thanks,
Otis






--
regards
jl


Re: Does sort field need have to be 'store'?

2007-06-26 Thread James liu

2007/6/27, Mike Klaas <[EMAIL PROTECTED]>:


On 25-Jun-07, at 10:53 PM, James liu wrote:

>
> [quote]how can i use index all with ram and how to config which ram
> i should
> use?[/quote]

Your os will automatically load the most frequently-used parts of the
index in ram.


If your total ram is at least as large as the total

JVM heap size plus the on-disk footprint of the index, it will
eventually reside completely in memory (assuming no other processes
are using ram).

I don't understand your second question.


-MIke




thks mike,,,the second question is how to calc the ram size i should have
when i wanna index reside completely in RAM.




--
regards
jl


Re: Does sort field need have to be 'store'?

2007-06-26 Thread Yonik Seeley

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:

thks mike,,,the second question is how to calc the ram size i should have
when i wanna index reside completely in RAM.


It's fairly specific to the collection... index a bunch of documents
and see how much space it takes up.  Make sure to do a lot of them
because the index normally grows sub-linearly.  Then subtract the size
the JVM is taking from the amount of RAM on the box.

-Yonik


Re: i wanna change response type to PHP serialize

2007-06-26 Thread James liu

Yes, i use 1.2my compile method:
download solr 1.2 and modify file by your patch.

use `ant dist` to compile it. no error show.

i can see its admin gui, but i wanna try search, it will show me the error
information,

Is my compile method right? if not, show me how to compile it.

it seems very strange ,only me fail? anyone have same question?

if free, maybe u zip your solr to me by mail...and i try it again.


2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:


Interesting, what version of solr are you using, I tested on 1.2.
-Nick

On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> i just cp it to src\java\org\apache\solr\request and ant dist...i think
> maybe my method is wrong.
>
> same error infromation...
>
> java.lang.NoClassDefFoundError:
org/apache/solr/search/ScorePriorityQueue
> at org.apache.solr.search.SolrIndexSearcher.getDocListNC(
SolrIndexSearcher.java:886)
> at org.apache.solr.search.SolrIndexSearcher.getDocListC(
SolrIndexSearcher.java:805)
> at org.apache.solr.search.SolrIndexSearcher.getDocList(
SolrIndexSearcher.java:698)
> at
org.apache.solr.request.StandardRequestHandler.handleRequestBody(
StandardRequestHandler.java:122)
> at org.apache.solr.handler.RequestHandlerBase.handleRequest(
RequestHandlerBase.java:77)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java
:66)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
SolrDispatchFilter.java:185)
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:228)
> at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:175)
> at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:104)
> at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:216)
> at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:844)
> at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:634)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
JIoEndpoint.java:445)
> at java.lang.Thread.run(Unknown Source)
>
>
>
>
> 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> >
> > I have some good news :o)
> >
> > https://issues.apache.org/jira/browse/SOLR-275
> >
> > Please let me know if you find any bugs
> > Thanks
> > -Nick
> >
> > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > I think it simple to u.
> > >
> > > so i wait for ur good news.
> > >
> > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > >
> > > > I am also quite interested in getting a serialized PHP array
response
> > > > writer, after some investigation it doesn't seem as difficult as I
> > > > first thought, I will have a try at implementing this when I get
some
> > > > time, the format of the array would probably end up being the same
as
> > > > if you were to use json_decode.
> > > > -Nick
> > > >
> > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > > > I am also looking for a PHP response writer that outputs
serialized
> > PHP
> > > > > code, I've taken a look at
> > > > > SOLR-196but it's
not
> > > > > quite what I need.  Unless anyone else has started implementing
> > > > > one, I will see if I can modify Paul's patch to do the task.
> > > > >
> > > > > cheers,
> > > > > Tristan
> > > > >
> > > > >
> > > > >
> > > > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > My experience tells me that serializing/unserializing tends to
be
> > > > faster
> > > > > > than eval(), especially on larger arrays.  I've looked at the
> > code,
> > > > trying
> > > > > > to put together a PHP serialized array output type, but
haven't
> > had
> > > > > > success
> > > > > > doing it yet.  If I do, it'll be contributed back, but until
> > someone
> > > > does
> > > > > > that version, the way Nick suggests is probably the only
option.
> > > > > >
> > > > > >
> > > > > > On 6/25/07, Nick Jenkin <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Hi James
> > > > > > > I think you would be better of outp

Re: XML vs JSON writer performance issues

2007-06-26 Thread James liu

XML data should bigger thant JSON data, and transfer quicker than JSON..

it surprised me.

2007/6/27, Yonik Seeley <[EMAIL PROTECTED]>:


It would be helpful if you could try out the patch at
https://issues.apache.org/jira/browse/SOLR-276

-Yonik


On 6/26/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:
> On 6/26/07, Jérôme Etévé <[EMAIL PROTECTED]> wrote:
> > I just tried the python writer and it's as fast as XML is.  I'm still
> > looking at the code trying to point out the reason of that.
> > Thanks for any help.
>
> It's Java's braindead Reader/Writer implementations.  If you want
> really good performance, one is forced to do their own buffering, even
> for a BufferedWriter (I assume the PrintWriter obtained from
> ServletResponse.getWriter() is buffered).
>
> -Yonik
>





--
regards
jl


Re: I'm using PHP curl post xml command to Solr,Is it the only way to post data?

2007-06-26 Thread James liu

how about its performance?

2007/6/26, Kijiji Xu, Ping <[EMAIL PROTECTED]>:


I had solved this problem,below is my POST code,I used HTTP_Request of
PEAR,it's so simple.thank you all very much .FYI;


private function doPost($url,$postData){
 $req = &new HTTP_Request($url,array(
'method' => HTTP_REQUEST_METHOD_POST,
'http' => HTTP_REQUEST_HTTP_VER_1_1));
 $req->addHeader('Content-Type','text/xml; charset=utf-8');
 $req->addHeader('Content-Length',strlen($postData));
 $req->addRawPostData($postData,true);
 $req->sendRequest();
 $response1 = $req->getResponseBody();
 echo $response1."\n";
 return $response1;
}


-Original Message-
From: Tristan Vittorio [mailto:[EMAIL PROTECTED]
Sent: 2007年6月25日 21:36
To: solr-user@lucene.apache.org
Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only
way to post data?

Rather than re-inventing the wheel with fsockopen, why don't you use an
existing HTTP client implementation written in PHP:

http://pear.php.net/package/HTTP_Client
http://framework.zend.com/manual/en/zend.http.html
http://scripts.incutio.com/httpclient/
http://www.phpclasses.org/browse/package/576.html

They should all be able to perform the HTTP POST requests that you require
and will be a lot easier to use that writing raw HTTP protocol through a
socket!

regards,
Tristan



On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
>
> In our product environment, there haven't curl and pecl lib,so...
> If the fsockopen could solve post xml data,I would like to use it.And I
> tried it, but I failed.
>
> -Original Message-
> From: Michael Kimsal [mailto:[EMAIL PROTECTED]
> Sent: 2007年6月25日 20:16
> To: solr-user@lucene.apache.org
> Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only
> way to post data?
>
> Using PHP5 (5.1 or higher I think)
> http://us.php.net/manual/en/function.http-post-fields.php
> is available.
>
> From the example on that page:
>
> $fields = array(
> 'name' => 'mike',
> 'pass' => 'passwordt'
> );
> $response = http_post_fields("http://www.example.com/";, $fields);
>
>
> Looks pretty simple, but I haven't tried it yet.
>
> On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
> >
> > What about fsockopen, Or any other simple method?
> >
> >
> >
> > Thanks
> >
> >
> >
> > --
> >
> > Regards
> >
> > Xp from china
> >
> >
>
>
> --
> Michael Kimsal
> http://webdevradio.com
>





--
regards
jl


Re: i wanna change response type to PHP serialize

2007-06-26 Thread Nick Jenkin

If you are using the example provided in 1.2 (using jetty) you need to
use "ant example"
rather than "ant dist"

-Nick

On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:

Yes, i use 1.2my compile method:
download solr 1.2 and modify file by your patch.

use `ant dist` to compile it. no error show.

i can see its admin gui, but i wanna try search, it will show me the error
information,

Is my compile method right? if not, show me how to compile it.

it seems very strange ,only me fail? anyone have same question?

if free, maybe u zip your solr to me by mail...and i try it again.


2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
>
> Interesting, what version of solr are you using, I tested on 1.2.
> -Nick
>
> On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > i just cp it to src\java\org\apache\solr\request and ant dist...i think
> > maybe my method is wrong.
> >
> > same error infromation...
> >
> > java.lang.NoClassDefFoundError:
> org/apache/solr/search/ScorePriorityQueue
> > at org.apache.solr.search.SolrIndexSearcher.getDocListNC(
> SolrIndexSearcher.java:886)
> > at org.apache.solr.search.SolrIndexSearcher.getDocListC(
> SolrIndexSearcher.java:805)
> > at org.apache.solr.search.SolrIndexSearcher.getDocList(
> SolrIndexSearcher.java:698)
> > at
> org.apache.solr.request.StandardRequestHandler.handleRequestBody(
> StandardRequestHandler.java:122)
> > at org.apache.solr.handler.RequestHandlerBase.handleRequest(
> RequestHandlerBase.java:77)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> > at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java
> :66)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:290)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:206)
> > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> SolrDispatchFilter.java:185)
> > at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:235)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:206)
> > at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:228)
> > at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:175)
> > at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:128)
> > at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:104)
> > at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:109)
> > at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:216)
> > at org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:844)
> > at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> Http11Protocol.java:634)
> > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> JIoEndpoint.java:445)
> > at java.lang.Thread.run(Unknown Source)
> >
> >
> >
> >
> > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > >
> > > I have some good news :o)
> > >
> > > https://issues.apache.org/jira/browse/SOLR-275
> > >
> > > Please let me know if you find any bugs
> > > Thanks
> > > -Nick
> > >
> > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > I think it simple to u.
> > > >
> > > > so i wait for ur good news.
> > > >
> > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > >
> > > > > I am also quite interested in getting a serialized PHP array
> response
> > > > > writer, after some investigation it doesn't seem as difficult as I
> > > > > first thought, I will have a try at implementing this when I get
> some
> > > > > time, the format of the array would probably end up being the same
> as
> > > > > if you were to use json_decode.
> > > > > -Nick
> > > > >
> > > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]> wrote:
> > > > > > I am also looking for a PHP response writer that outputs
> serialized
> > > PHP
> > > > > > code, I've taken a look at
> > > > > > SOLR-196but it's
> not
> > > > > > quite what I need.  Unless anyone else has started implementing
> > > > > > one, I will see if I can modify Paul's patch to do the task.
> > > > > >
> > > > > > cheers,
> > > > > > Tristan
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 6/25/07, Michael Kimsal <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > My experience tells me that serializing/unserializing tends to
> be
> > > > > faster
> > > > > > > than eval(), especially on larger arrays.  I've looked at the
> > > code,
> > > > > trying
> > > > > > > to put together a PHP serialized array outp

Re: i wanna change response type to PHP serialize

2007-06-26 Thread James liu

i use tomcat ,, send ur solr version to me...i try it again..

2007/6/27, Nick Jenkin <[EMAIL PROTECTED]>:


If you are using the example provided in 1.2 (using jetty) you need to
use "ant example"
rather than "ant dist"

-Nick

On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:
> Yes, i use 1.2my compile method:
> download solr 1.2 and modify file by your patch.
>
> use `ant dist` to compile it. no error show.
>
> i can see its admin gui, but i wanna try search, it will show me the
error
> information,
>
> Is my compile method right? if not, show me how to compile it.
>
> it seems very strange ,only me fail? anyone have same question?
>
> if free, maybe u zip your solr to me by mail...and i try it again.
>
>
> 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> >
> > Interesting, what version of solr are you using, I tested on 1.2.
> > -Nick
> >
> > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > i just cp it to src\java\org\apache\solr\request and ant dist...i
think
> > > maybe my method is wrong.
> > >
> > > same error infromation...
> > >
> > > java.lang.NoClassDefFoundError:
> > org/apache/solr/search/ScorePriorityQueue
> > > at org.apache.solr.search.SolrIndexSearcher.getDocListNC(
> > SolrIndexSearcher.java:886)
> > > at org.apache.solr.search.SolrIndexSearcher.getDocListC(
> > SolrIndexSearcher.java:805)
> > > at org.apache.solr.search.SolrIndexSearcher.getDocList(
> > SolrIndexSearcher.java:698)
> > > at
> > org.apache.solr.request.StandardRequestHandler.handleRequestBody(
> > StandardRequestHandler.java:122)
> > > at org.apache.solr.handler.RequestHandlerBase.handleRequest(
> > RequestHandlerBase.java:77)
> > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> > > at org.apache.solr.servlet.SolrServlet.doGet(
SolrServlet.java
> > :66)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java
:690)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java
:803)
> > > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > ApplicationFilterChain.java:290)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > ApplicationFilterChain.java:206)
> > > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> > SolrDispatchFilter.java:185)
> > > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > ApplicationFilterChain.java:235)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > ApplicationFilterChain.java:206)
> > > at org.apache.catalina.core.StandardWrapperValve.invoke(
> > StandardWrapperValve.java:228)
> > > at org.apache.catalina.core.StandardContextValve.invoke(
> > StandardContextValve.java:175)
> > > at org.apache.catalina.core.StandardHostValve.invoke(
> > StandardHostValve.java:128)
> > > at org.apache.catalina.valves.ErrorReportValve.invoke(
> > ErrorReportValve.java:104)
> > > at org.apache.catalina.core.StandardEngineValve.invoke(
> > StandardEngineValve.java:109)
> > > at org.apache.catalina.connector.CoyoteAdapter.service(
> > CoyoteAdapter.java:216)
> > > at org.apache.coyote.http11.Http11Processor.process(
> > Http11Processor.java:844)
> > > at
> >
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> > Http11Protocol.java:634)
> > > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> > JIoEndpoint.java:445)
> > > at java.lang.Thread.run(Unknown Source)
> > >
> > >
> > >
> > >
> > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > >
> > > > I have some good news :o)
> > > >
> > > > https://issues.apache.org/jira/browse/SOLR-275
> > > >
> > > > Please let me know if you find any bugs
> > > > Thanks
> > > > -Nick
> > > >
> > > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > I think it simple to u.
> > > > >
> > > > > so i wait for ur good news.
> > > > >
> > > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > I am also quite interested in getting a serialized PHP array
> > response
> > > > > > writer, after some investigation it doesn't seem as difficult
as I
> > > > > > first thought, I will have a try at implementing this when I
get
> > some
> > > > > > time, the format of the array would probably end up being the
same
> > as
> > > > > > if you were to use json_decode.
> > > > > > -Nick
> > > > > >
> > > > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]>
wrote:
> > > > > > > I am also looking for a PHP response writer that outputs
> > serialized
> > > > PHP
> > > > > > > code, I've taken a look at
> > > > > > > SOLR-196but
it's
> > not
> > > > > > > quite what I need.  Unless anyone else has started
implementing
> > > > > > > one, I will see if I can modify Paul's patch to do the task.
> > > > > > >
> > > > > > > cheers,
> > > > > > > Tristan
> > > > > > >
> > > > > > >
> > > >

Re: i wanna change response type to PHP serialize

2007-06-26 Thread Nick Jenkin

http://nickjenkin.com/misc/apache-solr-1.2.0-php-serialize.tar.gz

Try that
-Nick

On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:

i use tomcat ,, send ur solr version to me...i try it again..

2007/6/27, Nick Jenkin <[EMAIL PROTECTED]>:
>
> If you are using the example provided in 1.2 (using jetty) you need to
> use "ant example"
> rather than "ant dist"
>
> -Nick
>
> On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:
> > Yes, i use 1.2my compile method:
> > download solr 1.2 and modify file by your patch.
> >
> > use `ant dist` to compile it. no error show.
> >
> > i can see its admin gui, but i wanna try search, it will show me the
> error
> > information,
> >
> > Is my compile method right? if not, show me how to compile it.
> >
> > it seems very strange ,only me fail? anyone have same question?
> >
> > if free, maybe u zip your solr to me by mail...and i try it again.
> >
> >
> > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > >
> > > Interesting, what version of solr are you using, I tested on 1.2.
> > > -Nick
> > >
> > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > i just cp it to src\java\org\apache\solr\request and ant dist...i
> think
> > > > maybe my method is wrong.
> > > >
> > > > same error infromation...
> > > >
> > > > java.lang.NoClassDefFoundError:
> > > org/apache/solr/search/ScorePriorityQueue
> > > > at org.apache.solr.search.SolrIndexSearcher.getDocListNC(
> > > SolrIndexSearcher.java:886)
> > > > at org.apache.solr.search.SolrIndexSearcher.getDocListC(
> > > SolrIndexSearcher.java:805)
> > > > at org.apache.solr.search.SolrIndexSearcher.getDocList(
> > > SolrIndexSearcher.java:698)
> > > > at
> > > org.apache.solr.request.StandardRequestHandler.handleRequestBody(
> > > StandardRequestHandler.java:122)
> > > > at org.apache.solr.handler.RequestHandlerBase.handleRequest(
> > > RequestHandlerBase.java:77)
> > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
> > > > at org.apache.solr.servlet.SolrServlet.doGet(
> SolrServlet.java
> > > :66)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java
> :690)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java
> :803)
> > > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:290)
> > > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:206)
> > > > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> > > SolrDispatchFilter.java:185)
> > > > at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:235)
> > > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:206)
> > > > at org.apache.catalina.core.StandardWrapperValve.invoke(
> > > StandardWrapperValve.java:228)
> > > > at org.apache.catalina.core.StandardContextValve.invoke(
> > > StandardContextValve.java:175)
> > > > at org.apache.catalina.core.StandardHostValve.invoke(
> > > StandardHostValve.java:128)
> > > > at org.apache.catalina.valves.ErrorReportValve.invoke(
> > > ErrorReportValve.java:104)
> > > > at org.apache.catalina.core.StandardEngineValve.invoke(
> > > StandardEngineValve.java:109)
> > > > at org.apache.catalina.connector.CoyoteAdapter.service(
> > > CoyoteAdapter.java:216)
> > > > at org.apache.coyote.http11.Http11Processor.process(
> > > Http11Processor.java:844)
> > > > at
> > >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> > > Http11Protocol.java:634)
> > > > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> > > JIoEndpoint.java:445)
> > > > at java.lang.Thread.run(Unknown Source)
> > > >
> > > >
> > > >
> > > >
> > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > >
> > > > > I have some good news :o)
> > > > >
> > > > > https://issues.apache.org/jira/browse/SOLR-275
> > > > >
> > > > > Please let me know if you find any bugs
> > > > > Thanks
> > > > > -Nick
> > > > >
> > > > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > > I think it simple to u.
> > > > > >
> > > > > > so i wait for ur good news.
> > > > > >
> > > > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > > > >
> > > > > > > I am also quite interested in getting a serialized PHP array
> > > response
> > > > > > > writer, after some investigation it doesn't seem as difficult
> as I
> > > > > > > first thought, I will have a try at implementing this when I
> get
> > > some
> > > > > > > time, the format of the array would probably end up being the
> same
> > > as
> > > > > > > if you were to use json_decode.
> > > > > > > -Nick
> > > > > > >
> > > > > > > On 6/26/07, Tristan Vittorio <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > I am also looking for a PHP response writer that outputs
> > > serialized

RE: I'm using PHP curl post xml command to Solr,Is it the only way to post data?

2007-06-26 Thread Kijiji Xu, Ping
Ya,it cost 20-30ms per every update 1 doc operation(add,delete command) ,but 
not commit. So, I think it'a all right

-Original Message-
From: James liu [mailto:[EMAIL PROTECTED] 
Sent: 2007年6月27日 9:39
To: solr-user@lucene.apache.org
Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only way to 
post data?

how about its performance?

2007/6/26, Kijiji Xu, Ping <[EMAIL PROTECTED]>:
>
> I had solved this problem,below is my POST code,I used HTTP_Request of
> PEAR,it's so simple.thank you all very much .FYI;
>
>
> private function doPost($url,$postData){
>  $req = &new HTTP_Request($url,array(
> 'method' => HTTP_REQUEST_METHOD_POST,
> 'http' => HTTP_REQUEST_HTTP_VER_1_1));
>  $req->addHeader('Content-Type','text/xml; charset=utf-8');
>  $req->addHeader('Content-Length',strlen($postData));
>  $req->addRawPostData($postData,true);
>  $req->sendRequest();
>  $response1 = $req->getResponseBody();
>  echo $response1."\n";
>  return $response1;
> }
>
>
> -Original Message-
> From: Tristan Vittorio [mailto:[EMAIL PROTECTED]
> Sent: 2007年6月25日 21:36
> To: solr-user@lucene.apache.org
> Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only
> way to post data?
>
> Rather than re-inventing the wheel with fsockopen, why don't you use an
> existing HTTP client implementation written in PHP:
>
> http://pear.php.net/package/HTTP_Client
> http://framework.zend.com/manual/en/zend.http.html
> http://scripts.incutio.com/httpclient/
> http://www.phpclasses.org/browse/package/576.html
>
> They should all be able to perform the HTTP POST requests that you require
> and will be a lot easier to use that writing raw HTTP protocol through a
> socket!
>
> regards,
> Tristan
>
>
>
> On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
> >
> > In our product environment, there haven't curl and pecl lib,so...
> > If the fsockopen could solve post xml data,I would like to use it.And I
> > tried it, but I failed.
> >
> > -Original Message-
> > From: Michael Kimsal [mailto:[EMAIL PROTECTED]
> > Sent: 2007年6月25日 20:16
> > To: solr-user@lucene.apache.org
> > Subject: Re: I'm using PHP curl post xml command to Solr,Is it the only
> > way to post data?
> >
> > Using PHP5 (5.1 or higher I think)
> > http://us.php.net/manual/en/function.http-post-fields.php
> > is available.
> >
> > From the example on that page:
> >
> > $fields = array(
> > 'name' => 'mike',
> > 'pass' => 'passwordt'
> > );
> > $response = http_post_fields("http://www.example.com/";, $fields);
> >
> >
> > Looks pretty simple, but I haven't tried it yet.
> >
> > On 6/25/07, Kijiji Xu, Ping <[EMAIL PROTECTED]> wrote:
> > >
> > > What about fsockopen, Or any other simple method?
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > > --
> > >
> > > Regards
> > >
> > > Xp from china
> > >
> > >
> >
> >
> > --
> > Michael Kimsal
> > http://webdevradio.com
> >
>



-- 
regards
jl


Re: Dynamically calculated range facet

2007-06-26 Thread John Wang

www.browseengine.com has facet search that handles this.

We are working on a solr plugin.

-John

On 6/26/07, Mike Klaas <[EMAIL PROTECTED]> wrote:


On 26-Jun-07, at 3:01 PM, Martin Grotzke wrote:
> AFAICS I do not have the possibility to specify range queries in my
> application, as I do not have a clue what's the lowest and highest
> price in the search result and what are "good" ranges according
> to the (statistical) distribution of prices in the search result.
>
> So if it would be possible to go over each item in the search result
> I could check the price field and define my ranges for the specific
> query on solr side and return the price ranges as a facet.
>
> Has anybody done s.th. like this before, or is there s.th. that I'm
> missing and why this approach does not make sense at all?
>
> Otherwise, what would be a good starting point to plug in such
> functionality into solr?

Easy: facet based on fixed ranges (say, every 10 dollars for x < 100,
100 dollars for x < 1000, etc)., and combine them sensically on the
client-side.  Requires no solr-side modification.

A bit harder: define your own request handler that loops over the
documents after a search and samples the values of (say) the first 20
docs (or more, but be sure to use the FieldCache if so).  Calculate
your range queries, facets (code will be almost identical to the code
in the builtin request handlers), and return the results.

cheers,
-Mike



Re: i wanna change response type to PHP serialize

2007-06-26 Thread James liu

ok,,thks nick,,,i just forget replace jar file..

wait a minute i will test speed...



2007/6/27, Nick Jenkin <[EMAIL PROTECTED]>:


http://nickjenkin.com/misc/apache-solr-1.2.0-php-serialize.tar.gz

Try that
-Nick

On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:
> i use tomcat ,, send ur solr version to me...i try it again..
>
> 2007/6/27, Nick Jenkin <[EMAIL PROTECTED]>:
> >
> > If you are using the example provided in 1.2 (using jetty) you need to
> > use "ant example"
> > rather than "ant dist"
> >
> > -Nick
> >
> > On 6/27/07, James liu <[EMAIL PROTECTED]> wrote:
> > > Yes, i use 1.2my compile method:
> > > download solr 1.2 and modify file by your patch.
> > >
> > > use `ant dist` to compile it. no error show.
> > >
> > > i can see its admin gui, but i wanna try search, it will show me the
> > error
> > > information,
> > >
> > > Is my compile method right? if not, show me how to compile it.
> > >
> > > it seems very strange ,only me fail? anyone have same question?
> > >
> > > if free, maybe u zip your solr to me by mail...and i try it again.
> > >
> > >
> > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > >
> > > > Interesting, what version of solr are you using, I tested on 1.2.
> > > > -Nick
> > > >
> > > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > i just cp it to src\java\org\apache\solr\request and ant
dist...i
> > think
> > > > > maybe my method is wrong.
> > > > >
> > > > > same error infromation...
> > > > >
> > > > > java.lang.NoClassDefFoundError:
> > > > org/apache/solr/search/ScorePriorityQueue
> > > > > at org.apache.solr.search.SolrIndexSearcher.getDocListNC
(
> > > > SolrIndexSearcher.java:886)
> > > > > at org.apache.solr.search.SolrIndexSearcher.getDocListC(
> > > > SolrIndexSearcher.java:805)
> > > > > at org.apache.solr.search.SolrIndexSearcher.getDocList(
> > > > SolrIndexSearcher.java:698)
> > > > > at
> > > > org.apache.solr.request.StandardRequestHandler.handleRequestBody(
> > > > StandardRequestHandler.java:122)
> > > > > at
org.apache.solr.handler.RequestHandlerBase.handleRequest(
> > > > RequestHandlerBase.java:77)
> > > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java
:658)
> > > > > at org.apache.solr.servlet.SolrServlet.doGet(
> > SolrServlet.java
> > > > :66)
> > > > > at javax.servlet.http.HttpServlet.service(
HttpServlet.java
> > :690)
> > > > > at javax.servlet.http.HttpServlet.service(
HttpServlet.java
> > :803)
> > > > > at
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > > ApplicationFilterChain.java:290)
> > > > > at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > > ApplicationFilterChain.java:206)
> > > > > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> > > > SolrDispatchFilter.java:185)
> > > > > at
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > > ApplicationFilterChain.java:235)
> > > > > at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > > ApplicationFilterChain.java:206)
> > > > > at org.apache.catalina.core.StandardWrapperValve.invoke(
> > > > StandardWrapperValve.java:228)
> > > > > at org.apache.catalina.core.StandardContextValve.invoke(
> > > > StandardContextValve.java:175)
> > > > > at org.apache.catalina.core.StandardHostValve.invoke(
> > > > StandardHostValve.java:128)
> > > > > at org.apache.catalina.valves.ErrorReportValve.invoke(
> > > > ErrorReportValve.java:104)
> > > > > at org.apache.catalina.core.StandardEngineValve.invoke(
> > > > StandardEngineValve.java:109)
> > > > > at org.apache.catalina.connector.CoyoteAdapter.service(
> > > > CoyoteAdapter.java:216)
> > > > > at org.apache.coyote.http11.Http11Processor.process(
> > > > Http11Processor.java:844)
> > > > > at
> > > >
> >
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> > > > Http11Protocol.java:634)
> > > > > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> > > > JIoEndpoint.java:445)
> > > > > at java.lang.Thread.run(Unknown Source)
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > I have some good news :o)
> > > > > >
> > > > > > https://issues.apache.org/jira/browse/SOLR-275
> > > > > >
> > > > > > Please let me know if you find any bugs
> > > > > > Thanks
> > > > > > -Nick
> > > > > >
> > > > > > On 6/26/07, James liu <[EMAIL PROTECTED]> wrote:
> > > > > > > I think it simple to u.
> > > > > > >
> > > > > > > so i wait for ur good news.
> > > > > > >
> > > > > > > 2007/6/26, Nick Jenkin <[EMAIL PROTECTED]>:
> > > > > > > >
> > > > > > > > I am also quite interested in getting a serialized PHP
array
> > > > response
> > > > > > > > writer, after some investigation it doesn't seem as
difficult
> > as I
> > > > > > > > first thought, I will have a try at im

Re: snapshooter no go

2007-06-26 Thread Chris Hostetter

: Here is a puzzling one.  I can't get Solr to invoke snaphooter properly.
: Solr claims my snapshooter is not where I said it is:
:
: SEVERE: java.io.IOException: Cannot run program "snapshooter" (in
: directory "solr/bin"): java.io.IOException: error=2, No such file or
: directory

off the top of my head, i suspect the problem may be that there is not
PATH env var so it can't find "snapshooter" but it might be able to find
"./snapshooter"

either that or...

: $ cd /foo/jetty-6.1.3
: $ ls -al solr/bin/snapshooter
: -rwxr-xr-x 1 otis otis 2624 Jun 20 02:53 solr/bin/snapshooter

...what does "ls -ald solr solr/bin" tell you?  are the directories world
executable (assuming jetty isn't running as otis)




-Hoss



Re: Dynamically calculated range facet

2007-06-26 Thread Chris Hostetter

: my documents (products) have a price field, and I want to have
: a "dynamically" calculated range facet for that in the response.

FYI: there have been some previous discussions on this topic...

http://www.nabble.com/blahblah-t2387813.html#a6799060
http://www.nabble.com/faceted-browsing-t1363854.html#a3753053

: AFAICS I do not have the possibility to specify range queries in my
: application, as I do not have a clue what's the lowest and highest
: price in the search result and what are "good" ranges according
: to the (statistical) distribution of prices in the search result.

as mentioned in one of those threads, it's *really* hard to get the
statistical sampling to the point where it's both balanced, but also user
freindly.  writing code specificly for price ranges in dollars lets you
make some assumptions about things that give you "nice" ranges (rounding
to one significant digit less then the max, doing log based ranges, etc..)
that wouldn't really apply if you were trying to implement a truely
generic dynamic range generator.

one thing to keep in mind: it's typically not a good idea to have the
constraint set of a facet change just because some other constraint was
added to the query -- individual constraints might disappear because
they no longer apply, but it can be very disconcerting to a user to
when options hcange on them  if i search on "ipod" a statistical
analysis of prices might yeild facet ranges of $1-20, $20-60, $60-120,
$120-$200 ... if i then click on "accessories" the statistics might skew
cheaper, so hte new ranges are $1-20, $20-30, $30-40, $40-70 ...  and now
i'm a frustrated user, because i relaly wanted ot use the range $20-60
(that just happens to be my budget) and you offered it to me and then you
took it away ... i have to undo my selection or "accessories" then click
$20-60, and then click accessories to get what i wnat ... not very nice.

: So if it would be possible to go over each item in the search result
: I could check the price field and define my ranges for the specific
: query on solr side and return the price ranges as a facet.

: Otherwise, what would be a good starting point to plug in such
: functionality into solr?

if you relaly want to do statistical distributions, one way to avoid doing
all of this work on the client side (and needing to pull back all of hte
prices from all of hte matches) would be to write a custom request handler
that subclasses whichever on you currently use and does this computation
on the server side -- where it has lower level access to the data and
doesn't need to stream it over the wire.  FieldCache in particular would
come in handy.

it occurs to me that even though there may not be a way to dynamicly
create facet ranges that can apply usefully on any numeric field, we could
add generic support to the request handlers for optionally fetching some
basic statistics about a DocSet for clients that want them (either for
building ranges, or for any other purpose)

min, max, mean, median, mode, midrange ... those should all be easy to
compute using the ValueSource from the field type (it would be nice if
FieldType's had some way of indicating which DocValues function can best
manage the field type, but we can always assume float or have an option
for dictating it ... people might want a float mean for an int field
anyway)

i suppose even stddev could be computed fairly easily ... there's a
formula for that that works well in a single pass over a bunch of values
right?




-Hoss