Re: Bulk delete

2008-07-07 Thread Frans Flippo
Are you sure there is not a single criteria by which these documents
are selected for deletion? Surely they're not 1000 random documents?
Perhaps the criteria can not be described by the fields you're
currently indexing, but that's just a matter of adding the necessary
index fields.

E.g. date:[20080101 TO 20080330]

~ Frans

On Fri, Jul 4, 2008 at 4:52 PM, Jonathan Ariel <[EMAIL PROTECTED]> wrote:
> Hi,
> Is there any good way to do a bulk delete of several documents?
> I have more than 1000 documents to delete... and I don't want to send N
> request with X.
> Doing a query delete isn't a good solution because I have a maximum amount
> of terms that I can use in the query. For example:
> id:(X1 OR X2 OR  OR Xn) where n could be
> more than 1000
>
> Thanks,
>
> Jonathan
>


install problem with tomcat 5.5 on redhat

2008-07-07 Thread Gaetano Giunta

Hello

I have been trying without success to install Solr on a RHES 5.1 server 
using Java 1.5.0.16 from sun, Tomcat 5.5.23 from the Red Hat repositories.
I tested both the solr version that comes packaged with the eZFind 
extension for eZPublish and the latest nightly.


The error that comes up in both cases is:
...
XPathFactory#newInstance() failed to create an XPathFactory for the 
default object model: http://java.sun.com/jaxp/xpath/dom with the 
XPathFactoryConfigurationException: 
javax.xml.xpath.XPathFactoryConfiguration


There is also an error when trying to access the application info page 
from the Tomcat admin application.


I read on a previous message in the mailing list that a possibly similar 
error was solved by repackageing xalan.jar into the solr war file. What 
version of xalan should be used for that? I have xalan installed in 
/usr/share/java, but it is possibly misnomed or not picked up by classpath.


Any hints?

Thanks
Gaetano



Re: Which parser is used to parse response XML get from Solr

2008-07-07 Thread Ranjeet
I have downloaded "apache-solr-nightly" include the jar files, and now I 
have to get the response xml value, so for  invoking trhough I did not get 
the common package under solr, so  this class belongs to which jar files? 
pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 in 
defferent system. could you please help me, how to call the Solr server to 
get resposnse xml and want to show the same value on velocity page after 
geting values.




import org.apache.solr.common.SolrException;

import org.apache.solr.common.params.CommonParams;

mport org.apache.solr.common.params.DefaultSolrParams;

import org.apache.solr.common.params.ModifiableSolrParams;

import org.apache.solr.common.params.SolrParams;




String url = "http://192.168.1.2:8983/solr";;
SolrServer server = new CommonsHttpSolrServer(url);;
   SolrQuery solrQuery = new  SolrQuery().
 setQuery("ipod").
 setFacet(true).
 setFacetMinCount(1).
 setFacetLimit(8).
 addFacetField("category").
 addFacetField("inStock");
   QueryResponse rsp = server.query(solrQuery);



method query is not exist in server, so

- Original Message - 
From: "Shalin Shekhar Mangar" <[EMAIL PROTECTED]>

To: 
Sent: Monday, July 07, 2008 11:29 AM
Subject: Re: Which parser is used to parse response XML efficientl got from 
Solr



Where did you download Solr from? Are you sure it was the nightly build 
URL

that Noble gave?

On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <[EMAIL PROTECTED]>
wrote:


HI,

I am new to this, I did not find Solr1.3 distribution jar files to use 
the

"http://wiki.apache.org/solr/Solrj
", although I have downloaded Solr 1.2 but some files are not in Solr1.2 
in
order to use the XMLResponseParser . Please help me out of this problem 
to

provide the link of Solr1.3 download or related jar files links.


Thanks
Ranjeet
- Original Message - From: "Shalin Shekhar Mangar" <
[EMAIL PROTECTED]>
To: 
Sent: Sunday, July 06, 2008 7:32 PM
Subject: Re: Which parser is used to parse response XML efficientl got 
from

Solr


 Take a look at http://wiki.apache.org/solr/Solrj


On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
[EMAIL PROTECTED]>
wrote:

 It would be great if you send the sample code to parse the Solr

responseXML.

ranjeet


On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <[EMAIL PROTECTED]> wrote:
>
> apache-solr-solrj-1.3-dev.jar
> apache-solr-common-1.3-dev.jar
>
>
> On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
[EMAIL PROTECTED]>
> wrote:
> > which jar file should we include?
> >
> > ranjeet
> > - Original Message - From: "Noble Paul ??? ??"
> > <[EMAIL PROTECTED]>
> > To: 
> > Sent: Friday, July 04, 2008 11:38 AM
> > Subject: Re: Which parser is used to parse response XML efficientl 
> >  >

> got
> from
> > Solr
> >
> >
> >> Solr uses StaX API for parsing xml.
> >> use
> >> org.apache.solr.client.solrj.impl.XMLResponseParser
> >> --Noble
> >>
> >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
[EMAIL PROTECTED]
> >
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Which parser is used to parse Response XML got from Solr search
server.
> >>> can you pass sample code if you have.
> >>>
> >>> Thanks & Regards,
> >>> Ranjeet
>



--
Thanks & Regards,

Ranjeet Kumar Jha
+91 9811006657





--
Regards,
Shalin Shekhar Mangar.







--
Regards,
Shalin Shekhar Mangar.





Re: Which parser is used to parse response XML get from Solr

2008-07-07 Thread Noble Paul നോബിള്‍ नोब्ळ्
hi,
I have added a section of classpath setting for SolrJ
http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
--Noble

On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <[EMAIL PROTECTED]> wrote:
> I have downloaded "apache-solr-nightly" include the jar files, and now I
> have to get the response xml value, so for  invoking trhough I did not get
> the common package under solr, so  this class belongs to which jar files?
> pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 in
> defferent system. could you please help me, how to call the Solr server to
> get resposnse xml and want to show the same value on velocity page after
> geting values.
>
>
>
> import org.apache.solr.common.SolrException;
>
> import org.apache.solr.common.params.CommonParams;
>
> mport org.apache.solr.common.params.DefaultSolrParams;
>
> import org.apache.solr.common.params.ModifiableSolrParams;
>
> import org.apache.solr.common.params.SolrParams;
>
>
>
>
> String url = "http://192.168.1.2:8983/solr";;
> SolrServer server = new CommonsHttpSolrServer(url);;
>   SolrQuery solrQuery = new  SolrQuery().
> setQuery("ipod").
> setFacet(true).
> setFacetMinCount(1).
> setFacetLimit(8).
> addFacetField("category").
> addFacetField("inStock");
>   QueryResponse rsp = server.query(solrQuery);
>
>
>
> method query is not exist in server, so
>
> - Original Message - From: "Shalin Shekhar Mangar"
> <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, July 07, 2008 11:29 AM
> Subject: Re: Which parser is used to parse response XML efficientl got from
> Solr
>
>
>> Where did you download Solr from? Are you sure it was the nightly build
>> URL
>> that Noble gave?
>>
>> On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <[EMAIL PROTECTED]>
>> wrote:
>>
>>> HI,
>>>
>>> I am new to this, I did not find Solr1.3 distribution jar files to use
>>> the
>>> "http://wiki.apache.org/solr/Solrj
>>> ", although I have downloaded Solr 1.2 but some files are not in Solr1.2
>>> in
>>> order to use the XMLResponseParser . Please help me out of this problem
>>> to
>>> provide the link of Solr1.3 download or related jar files links.
>>>
>>>
>>> Thanks
>>> Ranjeet
>>> - Original Message - From: "Shalin Shekhar Mangar" <
>>> [EMAIL PROTECTED]>
>>> To: 
>>> Sent: Sunday, July 06, 2008 7:32 PM
>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>> from
>>> Solr
>>>
>>>
>>>  Take a look at http://wiki.apache.org/solr/Solrj

 On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
 [EMAIL PROTECTED]>
 wrote:

  It would be great if you send the sample code to parse the Solr
>
> responseXML.
>
> ranjeet
>
>
> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <[EMAIL PROTECTED]> wrote:
> >
> > apache-solr-solrj-1.3-dev.jar
> > apache-solr-common-1.3-dev.jar
> >
> >
> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
> [EMAIL PROTECTED]>
> > wrote:
> > > which jar file should we include?
> > >
> > > ranjeet
> > > - Original Message - From: "Noble Paul ??? ??"
> > > <[EMAIL PROTECTED]>
> > > To: 
> > > Sent: Friday, July 04, 2008 11:38 AM
> > > Subject: Re: Which parser is used to parse response XML efficientl
> > > > >  >
> > got
> > from
> > > Solr
> > >
> > >
> > >> Solr uses StaX API for parsing xml.
> > >> use
> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
> > >> --Noble
> > >>
> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
> [EMAIL PROTECTED]
> > >
> > >> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> Which parser is used to parse Response XML got from Solr search
> server.
> > >>> can you pass sample code if you have.
> > >>>
> > >>> Thanks & Regards,
> > >>> Ranjeet
> >
>
>
>
> --
> Thanks & Regards,
>
> Ranjeet Kumar Jha
> +91 9811006657
>
>


 --
 Regards,
 Shalin Shekhar Mangar.


>>>
>>
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>
>



-- 
--Noble Paul


Re: Which parser is used to parse response XML get from Solr

2008-07-07 Thread Ranjeet

Hi,

I have gone through the follwing link but  could not find the any section of 
setting classpath for SolrJ. Pls help me how to come out this problem.


Thanks
Ranjeet
- Original Message - 
From: "Noble Paul നോബിള്‍ नोब्ळ्" <[EMAIL PROTECTED]>

To: 
Sent: Monday, July 07, 2008 3:29 PM
Subject: Re: Which parser is used to parse response XML get from Solr



hi,
I have added a section of classpath setting for SolrJ
http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
--Noble

On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <[EMAIL PROTECTED]> 
wrote:

I have downloaded "apache-solr-nightly" include the jar files, and now I
have to get the response xml value, so for  invoking trhough I did not 
get

the common package under solr, so  this class belongs to which jar files?
pls help me out I am new to Solr1.3. Currently I have configured Solr1.2 
in
defferent system. could you please help me, how to call the Solr server 
to

get resposnse xml and want to show the same value on velocity page after
geting values.



import org.apache.solr.common.SolrException;

import org.apache.solr.common.params.CommonParams;

mport org.apache.solr.common.params.DefaultSolrParams;

import org.apache.solr.common.params.ModifiableSolrParams;

import org.apache.solr.common.params.SolrParams;




String url = "http://192.168.1.2:8983/solr";;
SolrServer server = new CommonsHttpSolrServer(url);;
  SolrQuery solrQuery = new  SolrQuery().
setQuery("ipod").
setFacet(true).
setFacetMinCount(1).
setFacetLimit(8).
addFacetField("category").
addFacetField("inStock");
  QueryResponse rsp = server.query(solrQuery);



method query is not exist in server, so

- Original Message - From: "Shalin Shekhar Mangar"
<[EMAIL PROTECTED]>
To: 
Sent: Monday, July 07, 2008 11:29 AM
Subject: Re: Which parser is used to parse response XML efficientl got 
from

Solr



Where did you download Solr from? Are you sure it was the nightly build
URL
that Noble gave?

On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <[EMAIL PROTECTED]>
wrote:


HI,

I am new to this, I did not find Solr1.3 distribution jar files to use
the
"http://wiki.apache.org/solr/Solrj
", although I have downloaded Solr 1.2 but some files are not in 
Solr1.2

in
order to use the XMLResponseParser . Please help me out of this problem
to
provide the link of Solr1.3 download or related jar files links.


Thanks
Ranjeet
- Original Message - From: "Shalin Shekhar Mangar" <
[EMAIL PROTECTED]>
To: 
Sent: Sunday, July 06, 2008 7:32 PM
Subject: Re: Which parser is used to parse response XML efficientl got
from
Solr


 Take a look at http://wiki.apache.org/solr/Solrj


On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
[EMAIL PROTECTED]>
wrote:

 It would be great if you send the sample code to parse the Solr


responseXML.

ranjeet


On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <[EMAIL PROTECTED]> wrote:
>
> apache-solr-solrj-1.3-dev.jar
> apache-solr-common-1.3-dev.jar
>
>
> On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
[EMAIL PROTECTED]>
> wrote:
> > which jar file should we include?
> >
> > ranjeet
> > - Original Message - From: "Noble Paul ??? ??"
> > <[EMAIL PROTECTED]>
> > To: 
> > Sent: Friday, July 04, 2008 11:38 AM
> > Subject: Re: Which parser is used to parse response XML 
> > efficientl

> > > >  >
> got
> from
> > Solr
> >
> >
> >> Solr uses StaX API for parsing xml.
> >> use
> >> org.apache.solr.client.solrj.impl.XMLResponseParser
> >> --Noble
> >>
> >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
[EMAIL PROTECTED]
> >
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Which parser is used to parse Response XML got from Solr search
server.
> >>> can you pass sample code if you have.
> >>>
> >>> Thanks & Regards,
> >>> Ranjeet
>



--
Thanks & Regards,

Ranjeet Kumar Jha
+91 9811006657





--
Regards,
Shalin Shekhar Mangar.







--
Regards,
Shalin Shekhar Mangar.








--
--Noble Paul





Re: Which parser is used to parse response XML get from Solr

2008-07-07 Thread Noble Paul നോബിള്‍ नोब्ळ्
I'm at a loss here.

http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

This may help you learn how to set classpath in java. The problem you
are facing has little to do with SolrJ .
--Noble

On Mon, Jul 7, 2008 at 5:47 PM, Ranjeet <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have gone through the follwing link but  could not find the any section of
> setting classpath for SolrJ. Pls help me how to come out this problem.
>
> Thanks
> Ranjeet
> - Original Message - From: "Noble Paul നോബിള്‍ नोब्ळ्"
> <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, July 07, 2008 3:29 PM
> Subject: Re: Which parser is used to parse response XML get from Solr
>
>
>> hi,
>> I have added a section of classpath setting for SolrJ
>>
>> http://wiki.apache.org/solr/Solrj#head-674dd7743df665fdd56e8eccddce16fc2de20e6e
>> --Noble
>>
>> On Mon, Jul 7, 2008 at 2:33 PM, Ranjeet <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> I have downloaded "apache-solr-nightly" include the jar files, and now I
>>> have to get the response xml value, so for  invoking trhough I did not
>>> get
>>> the common package under solr, so  this class belongs to which jar files?
>>> pls help me out I am new to Solr1.3. Currently I have configured Solr1.2
>>> in
>>> defferent system. could you please help me, how to call the Solr server
>>> to
>>> get resposnse xml and want to show the same value on velocity page after
>>> geting values.
>>>
>>>
>>>
>>> import org.apache.solr.common.SolrException;
>>>
>>> import org.apache.solr.common.params.CommonParams;
>>>
>>> mport org.apache.solr.common.params.DefaultSolrParams;
>>>
>>> import org.apache.solr.common.params.ModifiableSolrParams;
>>>
>>> import org.apache.solr.common.params.SolrParams;
>>>
>>>
>>>
>>>
>>> String url = "http://192.168.1.2:8983/solr";;
>>> SolrServer server = new CommonsHttpSolrServer(url);;
>>>  SolrQuery solrQuery = new  SolrQuery().
>>>setQuery("ipod").
>>>setFacet(true).
>>>setFacetMinCount(1).
>>>setFacetLimit(8).
>>>addFacetField("category").
>>>addFacetField("inStock");
>>>  QueryResponse rsp = server.query(solrQuery);
>>>
>>>
>>>
>>> method query is not exist in server, so
>>>
>>> - Original Message - From: "Shalin Shekhar Mangar"
>>> <[EMAIL PROTECTED]>
>>> To: 
>>> Sent: Monday, July 07, 2008 11:29 AM
>>> Subject: Re: Which parser is used to parse response XML efficientl got
>>> from
>>> Solr
>>>
>>>
 Where did you download Solr from? Are you sure it was the nightly build
 URL
 that Noble gave?

 On Mon, Jul 7, 2008 at 11:13 AM, Ranjeet <[EMAIL PROTECTED]>
 wrote:

> HI,
>
> I am new to this, I did not find Solr1.3 distribution jar files to use
> the
> "http://wiki.apache.org/solr/Solrj
> ", although I have downloaded Solr 1.2 but some files are not in
> Solr1.2
> in
> order to use the XMLResponseParser . Please help me out of this problem
> to
> provide the link of Solr1.3 download or related jar files links.
>
>
> Thanks
> Ranjeet
> - Original Message - From: "Shalin Shekhar Mangar" <
> [EMAIL PROTECTED]>
> To: 
> Sent: Sunday, July 06, 2008 7:32 PM
> Subject: Re: Which parser is used to parse response XML efficientl got
> from
> Solr
>
>
>  Take a look at http://wiki.apache.org/solr/Solrj
>>
>> On Sun, Jul 6, 2008 at 7:23 PM, Ranjeet Jha <
>> [EMAIL PROTECTED]>
>> wrote:
>>
>>  It would be great if you send the sample code to parse the Solr
>>>
>>> responseXML.
>>>
>>> ranjeet
>>>
>>>
>>> On 7/4/08, Noble Paul നോബിള്‍ नोब्ळ् <[EMAIL PROTECTED]> wrote:
>>> >
>>> > apache-solr-solrj-1.3-dev.jar
>>> > apache-solr-common-1.3-dev.jar
>>> >
>>> >
>>> > On Fri, Jul 4, 2008 at 12:19 PM, Ranjeet > <
>>> [EMAIL PROTECTED]>
>>> > wrote:
>>> > > which jar file should we include?
>>> > >
>>> > > ranjeet
>>> > > - Original Message - From: "Noble Paul ??? ??"
>>> > > <[EMAIL PROTECTED]>
>>> > > To: 
>>> > > Sent: Friday, July 04, 2008 11:38 AM
>>> > > Subject: Re: Which parser is used to parse response XML > >
>>> > > efficientl
>>> > > > >  >
>>> > got
>>> > from
>>> > > Solr
>>> > >
>>> > >
>>> > >> Solr uses StaX API for parsing xml.
>>> > >> use
>>> > >> org.apache.solr.client.solrj.impl.XMLResponseParser
>>> > >> --Noble
>>> > >>
>>> > >> On Fri, Jul 4, 2008 at 11:13 AM, Ranjeet <
>>> [EMAIL PROTECTED]
>>> > >
>>> > >> wrote:
>>> > >>>
>>> > >>> Hi,
>>> > >>>
>>> > >>> Which parser is used to parse Response XML got from Solr search
>>> server.
>>> > >>> can you pass sample code if you have.
>>> > >>>
>>> > >>> Thanks & Regards,
>>> > >>> Ranjeet
>>> >
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>>
>>

Re: Implementing MoreLikeThis in Ruby

2008-07-07 Thread Koji Sekiguchi

Neeti,

Do you know:

There are two ways to access MoreLikeThis from solr: from the 
MoreLikeThisHandler

or with the StandardRequestHandler.
http://wiki.apache.org/solr/MoreLikeThis

You set MoreLikeThisHandler in your solrconfig.xml:

> 
> 
> channel_name
> 1
> 
> 

but you were using StandardRequestHandler in your request:

> 
http://localhost:8983/solr/select?q=BBT&mlt=true&mlt.fl=channel_name&mlt.mindf=1&mlt.mintf=1


If you want to use MoreLikeThisHandler you set in your solrconfig.xml, 
specify /mlt

instead of /select in your request url.

Koji




Filter query + holding previous Facet query counts

2008-07-07 Thread Jon Baer

Hi,

Is there an easy way to use fq to filter down but retain the overall  
facet query counts?  I can't seem to find how to accomplish this but  
seems like a common item needed for navigating though a result set.  I  
need to do this w/o holding a session and the counts always seem to  
reflect the current fq instead of the overall lookup.


Thanks.

- Jon


implementing a random result request handler - solr 1.2

2008-07-07 Thread Sean Laval
I have seen various posts about implementing random sorting relating to the 1.3 
code base but I am trying to do this in 1.2. Does anyone have any suggestions? 
The approach I have considered is to implement my own request handler that 
picks random documents from a larger result list. I therefore need to be able 
to create a DocList and add documents to it but can't seem to do this. Does 
anyone have any advice they could offer please?

Regards,

Sean

Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Walter Underwood
Why do you want random hits? If we know more about the bigger
problem, we can probably make better suggestions.

Fundamentally, Lucene is designed to quickly return the best
hits for a query. Returning random hits from the entire
matched set is likely to be very slow. It just isn't what
Lucene is designed to do.

wunder

On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:

> I have seen various posts about implementing random sorting relating to the
> 1.3 code base but I am trying to do this in 1.2. Does anyone have any
> suggestions? The approach I have considered is to implement my own request
> handler that picks random documents from a larger result list. I therefore
> need to be able to create a DocList and add documents to it but can't seem to
> do this. Does anyone have any advice they could offer please?
> 
> Regards,
> 
> Sean



Auto complete

2008-07-07 Thread sundar shankar

Hi All,
   I am using Solr for some time and am having trouble with an auto 
complete feature that I have been trying to incorporate. I am indexing solr as 
a database column to solr field mapping. I have tried various configs that were 
mentioned in the solr user community suggestions and have tried a few option of 
my own too. Each of them seem to either not bring me the exact data I want or 
seems to get excess data.

I have tried.
text_ws,
text,
string
EdgeNGramTokenizerFactory
the subword example
textTight
and juggling arnd some of the filters and analysers togther.

Couldnt get dismax to work as somehow it wasnt able to connect my field defined 
in the schema to the qf param that I was passing in the request.

Text tight was the best results I had but the problem there was it was 
searching for whole words and not part words.
example

if my query String was field1:Word1 word2* I was getting back results but if my 
query string was field1: Word1 wor* I didnt get a result back.

I am little perplexed on how to implement this. I dont know what has to be done.

The schema


   
   

   
   
   
   

   
   



I Index institution.name only, the rest are copy fields of the same.


Any help is appreciated.

Thanks
Sundar

_
Chose your Life Partner? Join MSN Matrimony
http://www.shaadi.com/msn/matrimony.php 

Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Sean Laval
Well its simply a business requirement from my perspective. I am not sure I 
can say more than that. I could maybe implement a request handler that did 
an initial search to work out how many hits there are resulting from the 
query and then did as many more queries as were required fetching just 1 
document starting at a given random number .. would that work? Sounds a bit 
cludgy to me even as I say it.


Sean



--
From: "Walter Underwood" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 5:06 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


Why do you want random hits? If we know more about the bigger
problem, we can probably make better suggestions.

Fundamentally, Lucene is designed to quickly return the best
hits for a query. Returning random hits from the entire
matched set is likely to be very slow. It just isn't what
Lucene is designed to do.

wunder

On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:

I have seen various posts about implementing random sorting relating to 
the

1.3 code base but I am trying to do this in 1.2. Does anyone have any
suggestions? The approach I have considered is to implement my own 
request
handler that picks random documents from a larger result list. I 
therefore
need to be able to create a DocList and add documents to it but can't 
seem to

do this. Does anyone have any advice they could offer please?

Regards,

Sean





Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Sean Laval
Perhaps I can  be clearer about my requirement... I need to populate a 
portlet with a random list of documents of a specified size from the index, 
thats all.


Thanks, and any help would be a greatly appreciated.

--
From: "Walter Underwood" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 5:06 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


Why do you want random hits? If we know more about the bigger
problem, we can probably make better suggestions.

Fundamentally, Lucene is designed to quickly return the best
hits for a query. Returning random hits from the entire
matched set is likely to be very slow. It just isn't what
Lucene is designed to do.

wunder

On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:

I have seen various posts about implementing random sorting relating to 
the

1.3 code base but I am trying to do this in 1.2. Does anyone have any
suggestions? The approach I have considered is to implement my own 
request
handler that picks random documents from a larger result list. I 
therefore
need to be able to create a DocList and add documents to it but can't 
seem to

do this. Does anyone have any advice they could offer please?

Regards,

Sean





Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Yonik Seeley
If it's just a random ordering you are looking for, it's implemented
in the latest Solr 1.3
Solr 1.3 should be out soon, so if you are just starting development,
I'd start with the latest Solr version.

If you really need to stick with 1.2 (even after 1.3 is out?)  then
RandomSortField should be easy to backport to 1.2

-Yonik

On Mon, Jul 7, 2008 at 1:15 PM, Sean Laval <[EMAIL PROTECTED]> wrote:
> Well its simply a business requirement from my perspective. I am not sure I
> can say more than that. I could maybe implement a request handler that did
> an initial search to work out how many hits there are resulting from the
> query and then did as many more queries as were required fetching just 1
> document starting at a given random number .. would that work? Sounds a bit
> cludgy to me even as I say it.
>
> Sean
>
>
>
> --
> From: "Walter Underwood" <[EMAIL PROTECTED]>
> Sent: Monday, July 07, 2008 5:06 PM
> To: 
> Subject: Re: implementing a random result request handler - solr 1.2
>
>> Why do you want random hits? If we know more about the bigger
>> problem, we can probably make better suggestions.
>>
>> Fundamentally, Lucene is designed to quickly return the best
>> hits for a query. Returning random hits from the entire
>> matched set is likely to be very slow. It just isn't what
>> Lucene is designed to do.
>>
>> wunder
>>
>> On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:
>>
>>> I have seen various posts about implementing random sorting relating to
>>> the
>>> 1.3 code base but I am trying to do this in 1.2. Does anyone have any
>>> suggestions? The approach I have considered is to implement my own
>>> request
>>> handler that picks random documents from a larger result list. I
>>> therefore
>>> need to be able to create a DocList and add documents to it but can't
>>> seem to
>>> do this. Does anyone have any advice they could offer please?
>>>
>>> Regards,
>>>
>>> Sean
>>
>>
>


Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Walter Underwood
Is it a business requirement that this is fast? If so, you are
going to spend a lot of money on hardware. Might want to request
that the business people think again about their requirements.

Here is one way to do this, using the simplest Solr/Lucene features.
An implementation internal to Solr would probably look similar, but
might not be much faster, especially if the processing is dominated
by disk accesses.

1. Do the query, requesting 100 hits, using the default sort, and
only return the ID field.

2. Randomly sample that set of 100, adding the chosen IDs to a set,
then request the next 100.

3. Stop when you have a big enough sample (this might be before the
end of the list).

4. Make another request with 100 of the IDs and the desired fields.
The query will look like: "id:1 OR id:99 OR id:186 OR id:42".

wunder

On 7/7/08 10:15 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:

> Well its simply a business requirement from my perspective. I am not sure I
> can say more than that. I could maybe implement a request handler that did
> an initial search to work out how many hits there are resulting from the
> query and then did as many more queries as were required fetching just 1
> document starting at a given random number .. would that work? Sounds a bit
> cludgy to me even as I say it.
> 
> Sean
> 
> 
> 
> --
> From: "Walter Underwood" <[EMAIL PROTECTED]>
> Sent: Monday, July 07, 2008 5:06 PM
> To: 
> Subject: Re: implementing a random result request handler - solr 1.2
> 
>> Why do you want random hits? If we know more about the bigger
>> problem, we can probably make better suggestions.
>> 
>> Fundamentally, Lucene is designed to quickly return the best
>> hits for a query. Returning random hits from the entire
>> matched set is likely to be very slow. It just isn't what
>> Lucene is designed to do.
>> 
>> wunder
>> 
>> On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:
>> 
>>> I have seen various posts about implementing random sorting relating to
>>> the
>>> 1.3 code base but I am trying to do this in 1.2. Does anyone have any
>>> suggestions? The approach I have considered is to implement my own
>>> request
>>> handler that picks random documents from a larger result list. I
>>> therefore
>>> need to be able to create a DocList and add documents to it but can't
>>> seem to
>>> do this. Does anyone have any advice they could offer please?
>>> 
>>> Regards,
>>> 
>>> Sean
>> 
>> 



Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Sean Laval
The RandomSortField in 1.3 each time you then issue a query, you get the 
same random sort order right? That is to say the randomness is implemented 
at index time rather than search time?


Thanks,

--
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 6:22 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


If it's just a random ordering you are looking for, it's implemented
in the latest Solr 1.3
Solr 1.3 should be out soon, so if you are just starting development,
I'd start with the latest Solr version.

If you really need to stick with 1.2 (even after 1.3 is out?)  then
RandomSortField should be easy to backport to 1.2

-Yonik

On Mon, Jul 7, 2008 at 1:15 PM, Sean Laval <[EMAIL PROTECTED]> wrote:
Well its simply a business requirement from my perspective. I am not sure 
I
can say more than that. I could maybe implement a request handler that 
did

an initial search to work out how many hits there are resulting from the
query and then did as many more queries as were required fetching just 1
document starting at a given random number .. would that work? Sounds a 
bit

cludgy to me even as I say it.

Sean



--
From: "Walter Underwood" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 5:06 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


Why do you want random hits? If we know more about the bigger
problem, we can probably make better suggestions.

Fundamentally, Lucene is designed to quickly return the best
hits for a query. Returning random hits from the entire
matched set is likely to be very slow. It just isn't what
Lucene is designed to do.

wunder

On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:


I have seen various posts about implementing random sorting relating to
the
1.3 code base but I am trying to do this in 1.2. Does anyone have any
suggestions? The approach I have considered is to implement my own
request
handler that picks random documents from a larger result list. I
therefore
need to be able to create a DocList and add documents to it but can't
seem to
do this. Does anyone have any advice they could offer please?

Regards,

Sean









Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Ryan McKinley
The random sort field in solr 1.3 relies on the field name and dynamic  
fields for ordering.  Check the example solrconfig.xml in 1.3


   

to get random results, try various field names:
 &sort=rand_123 asc
 &sort=rand_xyz asc
 &sort=rand_{generate your random number on the client} asc

This is good because you will get the same results for the same query  
string, and will get a new set of random results for a new URL.


ryan


On Jul 7, 2008, at 1:40 PM, Sean Laval wrote:
The RandomSortField in 1.3 each time you then issue a query, you  
get the same random sort order right? That is to say the randomness  
is implemented at index time rather than search time?


Thanks,

--
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 6:22 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


If it's just a random ordering you are looking for, it's implemented
in the latest Solr 1.3
Solr 1.3 should be out soon, so if you are just starting development,
I'd start with the latest Solr version.

If you really need to stick with 1.2 (even after 1.3 is out?)  then
RandomSortField should be easy to backport to 1.2

-Yonik

On Mon, Jul 7, 2008 at 1:15 PM, Sean Laval <[EMAIL PROTECTED]>  
wrote:
Well its simply a business requirement from my perspective. I am  
not sure I
can say more than that. I could maybe implement a request handler  
that did
an initial search to work out how many hits there are resulting  
from the
query and then did as many more queries as were required fetching  
just 1
document starting at a given random number .. would that work?  
Sounds a bit

cludgy to me even as I say it.

Sean



--
From: "Walter Underwood" <[EMAIL PROTECTED]>
Sent: Monday, July 07, 2008 5:06 PM
To: 
Subject: Re: implementing a random result request handler - solr 1.2


Why do you want random hits? If we know more about the bigger
problem, we can probably make better suggestions.

Fundamentally, Lucene is designed to quickly return the best
hits for a query. Returning random hits from the entire
matched set is likely to be very slow. It just isn't what
Lucene is designed to do.

wunder

On 7/7/08 8:58 AM, "Sean Laval" <[EMAIL PROTECTED]> wrote:

I have seen various posts about implementing random sorting  
relating to

the
1.3 code base but I am trying to do this in 1.2. Does anyone  
have any

suggestions? The approach I have considered is to implement my own
request
handler that picks random documents from a larger result list. I
therefore
need to be able to create a DocList and add documents to it but  
can't

seem to
do this. Does anyone have any advice they could offer please?

Regards,

Sean









Re: implementing a random result request handler - solr 1.2

2008-07-07 Thread Yonik Seeley
On Mon, Jul 7, 2008 at 1:40 PM, Sean Laval <[EMAIL PROTECTED]> wrote:
> The RandomSortField in 1.3 each time you then issue a query, you get the
> same random sort order right? That is to say the randomness is implemented
> at index time rather than search time?

See the comment in the example schema:




-Yonik


Re: js client

2008-07-07 Thread Benson Margulies
The Javascript should have the right URL automatically if you get it from
the ?js URL.

Anyway, I think I was the first person to say 'stupid' about that WSDL in
the sample.

I'm not at all clear on what you are doing at this point.

Please send along  the URL that works for you in soapUI and the URL that
works for you in the ... element.




On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman <[EMAIL PROTECTED]>
wrote:

> On Sun, 2008-07-06 at 10:25 -0400, Benson Margulies wrote:
> > In the sample, it is a relative URL to the web service endpoint. The
> > sample starts from a stupid WSDL with silly names for the service and
> > the port.
>
> I'm sorry about using the word "stupid".
>
> >
> > Take your endpoint deployment URL, the very URL that is logged when
> > your service starts up, and add ?js to the end of it. Period.
>
> Yes, that's what I do, and that part has been working all the time. What
> doesn't work is I use the same url without the ?js for the web service.
> Is there a way to see the Jetty log file? Mabye that will give me a clue
> what's happening. If nothing is in the jetty log file, I know the
> problem is elsewhere.
>
> Christine
>
> >
> > If it is
> >
> > http://wendy.christine.nl:9000/soap, make it
> >
> >  http://wendy.christine.nl:9000/soap?js
> >
> >
> >
> > The sample is taking advantage of relative URLs to avoid typing
> > http://etc.
> >
> > On Sun, Jul 6, 2008 at 8:52 AM, Christine Karman
> > <[EMAIL PROTECTED]> wrote:
> > On Sun, 2008-07-06 at 07:37 -0400, Benson Margulies wrote:
> > > The javascript client probably cannot handle redirects. If
> > you are now
> > > using ?js, you shouldn't need a redirect.
> >
> >
> > well actually, the server redirect is similar to a rewrite. It
> > makes /soap the same as /soap:9000. removing the redirect
> > brings me back
> > to the 650 error, "access to restricted uri denied".
> >
> > What does the /Soap/SoapPort mean in the sample? how does that
> > translate
> > to my localhost:9000 or localhost/soap? (localhost ==
> > wendy.christine.nl).
> >
> > It's silly that creating the web service from my java code is
> > so very
> > simple, and that some stupid javascript code can't be
> > persuaded to work
> > properly :-)  I've done my part of javascript but I have never
> > liked it.
> >
> > CXF is really good. I was in a project a while ago where I
> > suggested to
> > use cxf, but someone who was supposed to have releavant
> > experience
> > insisted on using axis2. Took him a week to create some soap
> > services.
> > He had to remove all enums  and nested objects from the
> > project because
> > axis wouldn't support that. A friend of mine is using cxf in
> > his project
> > and he insisted I use it also.
> >
> > Christine
> >
> >
> > >
> > > The browser allows an HTML page to load javascript from
> > anywhere. Once
> > > it has loaded javascript from a host:port, it will allow
> > outbound
> > > connections to that host:port.
> > >
> > > So, once you use src="./?js" you should be set.
> > >
> > > The sample does not fully demonstrate this effect, since it
> > has the
> > > benefit of really  running the web service and the static
> > HTML from
> > > the very same host::port.
> > >
> > > In the past, before there was such a thing as the ?js URL,
> > the
> > > solution here was a reverse proxy instead of a redirect. You
> > set up
> > > URL rewriting in plain old Apache 2 so that xxx:9000 is
> > transparently
> > > available at xxx.
> > >
> > > I don't have my recipe for this available at home, if you're
> > still
> > > stuck tomorrow I can dig it out of my office.
> > >
> > >
> > >
> > >
> > > On Sun, Jul 6, 2008 at 7:20 AM, Christine
> > <[EMAIL PROTECTED]>
> > > wrote:
> > > Benson,
> > > I'm still struggling. This is what I have now.
> > > I have copied the Greeter example
> > (js-browser-client-simple)
> > > from the
> > > samples. Because cross-scripting is not allowed (I
> > think that
> > > was
> > > causing the 650 error I got) I have created a
> > redirect in my
> > > apache web
> > > server so my url is now local and at port 80.
> > The ?js import
> > > works fine.
> > > My url is the same as the ?js url, without the ?js.
> > > I have tested my web service with SoapUI. When I
> > point my
> > >

Re: First version of solr javascript client to review

2008-07-07 Thread Erik Hatcher

Mattias,

Nice start!

One comment

In test.html:
  new $sj.solrjs.Manager({solrUrl:"http://localhost:8983/solr/ 
select"});


  It would be better to omit the "/select" from the base URL.   
Consider Solr rooted at a particular URL without the request handler  
mapping attached to it, and allow the "/select" or "qt=whatever" to be  
added at a different stage.  This way SolrJS can attach to any number  
of request handlers depending on context.


Ryan commented on using something besides JavaScript to generate HTML  
pieces.  One alternative that I propose is to use a  
VelocityResponseWriter (see SOLR-620 for a first draft) to generate  
the HTML framework which SolrJS can then deal with.  I'm personally  
fonder of the bulk of HTML generated server-side, even snippets that  
are AJAXed in, leaving SolrJS to mainly deal with widgets and getting  
JSON data to them when HTML generation doesn't make sense.  SOLR-620  
is still raw, and needs some work to make it really easy to leverage,  
but I wanted to toss it out there for folks to improve upon as needed.


Also, consider wiring in a SIMILE Timeline (or perhaps even SIMILE  
Exhibit) widget - it'd make for a snazzy example :)  Of course, Google  
Maps would make a great example as well.


Erik



On Jul 1, 2008, at 4:00 AM, Matthias Epheser wrote:


Hi community,

as described here http://www.nabble.com/Announcement-of-Solr-Javascript-Client-to17462581.html 
 I started to work on a javascript widget library for solr.


I've now finished the basic framework work:

- creating a jquery environment
- creating helpers for jquery inheritance
- testing the json communication between client and solr
- creating a base class "AbstractWidget"

After that, I implemented a SimpleFacet widget and 2 ResultViews to  
show how these things will work in the new jquery environment.


A new wiki page documents this progress:
http://wiki.apache.org/solr/SolrJS

Check out the trunk at:
http://solrstuff.org/svn/solrjs/trunk/


Feedback about the implementation, the quality of code  
(documentation, integration into html, customizing the widgets) as  
well as ideas for future widgets etc. is very welcome.


regards
matthias