Can find solr jars in WEB-INF/lib directory

2009-03-03 Thread The Flight Captain

I am wrapping CoreContainer in my own class (FacetServerImpl), so that I can
override the query(SolrRequest request) method to return an xml String. This
is the best way I found to get an xml response from Solr, without deploying
solr as a service, note that EmbeddedSolrServer returns a NamedList.

My application works fine in JUnit tests, creating a CoreContainer and
getting a SolrCore object as listed below. However when I try to deploy
FacetServerImpl.class to a web container (JBoss) I get a
java.lang.NoClassDefFoundError for SolrIndexReader, (See Stack Trace below).
I am instantiating MyServerImpl using Spring's ContextLoaderListener when
deploying my application. I have the apache-solr-core-nightly.jar (which
contains SolrIndexReader.class) in the WEB-INF/lib directory on my
application.

I have also tried putting apache-solr-core-nightly.jar in the lib directory
under Solr Home. When I do this, the stack trace prints that it loads the
apache-solr-core-nightly.jar, but still fails due to the
NoClassDefFoundError found above, I have also included this StackTrace. I
have also tried making CoreContainer a Spring managed bean, but the same
Exception is thrown. Making CoreContainer a Spring managed bean may allow me
to pass in in a ClassLoader but I'm not sure if this is the right approach
to solve the problem.

How can I make the apache-solr-core-nightly.jar available to
ContextLoaderListener during bootstrapping of my Web Application?


 //these are String parameters retrieved from my solr.properties
argument
 coreContainer = createContainer(solrHome, configFilename, dataDir,
solrSchema);  

private CoreContainer createContainer(String solrHome, String
configFilename, String dataDir, String solrSchema) {
CoreContainer container = getCoreContainer();
SolrCore core = core(solrHome, configFilename, dataDir, solrSchema,
container);
container.register(CORE_NAME, core, false);
return container;
}

private CoreContainer getCoreContainer() {
String dir = SolrResourceLoader.locateInstanceDir();
SolrResourceLoader loader = new SolrResourceLoader(dir);
return new CoreContainer(loader);
}

private SolrCore core(String solrHome, String configFilename, String
dataDir, String solrSchema, CoreContainer container) {
SolrConfig solrConfig = createSolrConfig(solrHome, configFilename);
CoreDescriptor descriptor = descriptor(container);
IndexSchema schema = new IndexSchema(solrConfig, solrSchema, null);
return new SolrCore(CORE_NAME, dataDir, solrConfig, schema,
descriptor);
}

Exception Stack Trace:
2009-03-03 17:13:31,774 INFO  [org.apache.solr.core.SolrResourceLoader]
Reusing parent classloader
2009-03-03 17:13:32,332 ERROR
[org.springframework.web.context.ContextLoader] Context initialization
failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'net.fct.pct.facet.importer.DataImporterImpl#0'
defined in URL
[jar:file:/home/sheperdj/work/pct_facet_web2/procat-web/gen/jboss/jboss-eap-4.3/jboss-as/server/production/tmp/deploy/tmp7114744926167161286pct-exp.war/WEB-INF/lib/procat-facet.jar!/applicationContext-facet.xml]:
Unsatisfied dependency expressed through constructor argument with index 0
of type [net.fct.pct.facet.server.FacetServer]: Error creating bean with
name 'net.fct.pct.facet.server.FacetServerImpl#0' defined in URL
[jar:file:/home/sheperdj/work/pct_facet_web2/procat-web/gen/jboss/jboss-eap-4.3/jboss-as/server/production/tmp/deploy/tmp7114744926167161286pct-exp.war/WEB-INF/lib/procat-facet.jar!/applicationContext-facet.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [net.fct.pct.facet.server.FacetServerImpl]: Constructor threw
exception; nested exception is java.lang.NoClassDefFoundError:
org/apache/solr/search/SolrIndexReader

StackTrace with apache-solr-core-night.jar in solr.home/lib directory
2009-03-03 17:58:15,350 INFO  [org.apache.solr.core.SolrResourceLoader] Solr
home set to '/opt/procat/solr/'
2009-03-03 17:58:15,351 INFO  [org.apache.solr.core.SolrResourceLoader]
Adding 'file:/opt/procat/solr/lib/apache-solr-core-nightly.jar' to Solr
classloader
2009-03-03 17:58:15,351 INFO  [org.apache.solr.core.SolrResourceLoader]
Adding 'file:/opt/procat/solr/lib/apache-solr-solrj-nightly.jar' to Solr
classloader
2009-03-03 17:58:15,352 INFO  [org.apache.solr.core.SolrResourceLoader]
Adding 'file:/opt/procat/solr/lib/apache-solr-cell-nightly.jar' to Solr
classloader
2009-03-03 17:58:15,353 INFO  [org.apache.solr.core.SolrResourceLoader]
Adding 'file:/opt/procat/solr/lib/apache-solr-dataimporthandler-nightly.jar'
to Solr classloader
2009-03-03 17:58:16,265 ERROR
[org.springframework.web.context.ContextLoader] Context initialization
failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'net.fct.pct.facet.impo

Field Boosting with q.alt parameter Query

2009-03-03 Thread dabboo

Hi,

Is there any way, we can implement field boosting with q.alt parameter
query. I would appreciate if somebody can suggest if there is any workaround
for the same.

Thanks,
Amit Garg
-- 
View this message in context: 
http://www.nabble.com/Field-Boosting-with-q.alt-parameter-Query-tp22304491p22304491.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Difference between q and q.alt parameter query

2009-03-03 Thread Erik Hatcher
The dismax parser does not support wildcard queries currently (but see  
also SOLR-756).  Again, use defType=lucene to get that capability.   
But, you will lose the qf field specific boosting capability.  You  
can, however, OR in additional clauses for boosting (like the dismax  
bq does).


Query parsing is tricky business.  Mark Miller blogged a great entry  
about the various options available: 


Erik

On Mar 2, 2009, at 11:06 PM, dabboo wrote:



Here is what I am getting with debugQuery=true


- 
- 
 0
 110
- 
 10
 0
 lucene
 on
 da*
 dismaxrequest
 true
 2.2
 
 
 
- 
 da*
 da*
 name="parsedquery"> 
+DisjunctionMaxQuery((programJacketImage_program_s:da* |
courseCodeSeq_course_s:da* | authorLastName_product_s:da* |  
Index_Type_s:da*

| prdMainTitle_s:da*^10.0 | discCode_course_s:da* |
sourceGroupName_course_s:da* | indexType_course_s:da* |
prdMainTitle_product_s:da* | isbn10_product_s:da* |  
displayName_course_s:da*

| groupNm_program_s:da* | discipline_product_s:da* |
courseJacketImage_course_s:da* | imprint_product_s:da* |
introText_program_s:da* | productType_product_s:da* |  
isbn13_product_s:da* |

copyrightYear_product_s:da* | prdPubDate_product_s:da* |
programType_program_s:da* | editor_product_s:da* |  
courseType_course_s:da* |
productURL_s:da*^1.0 | courseId_course_s:da* |  
categoryIds_product_s:da*

| indexType_program_s:da* | strapline_product_s:da* |
subCompany_course_s:da* | aluminator_product_s:da* |  
readBy_product_s:da* |

subject_product_s:da* | edition_product_s:da* |
programId_program_s:da*)~0.01) () all:english^90.0 all:hindi^123.0
all:glorious^2000.0 all:highlight^1.0E7 all:math^100.0 all:ab^12.0
all:erer^4545.0 MultiPhraseQuery(all:"(prd prd main prd main titl  
prd main

titl s) (main main titl main titl s) (titl titl s) s"^10.0)
MultiPhraseQuery(all:"(product product url product url s) (url url s)
s"^1.0)
 +(programJacketImage_program_s:da* |
courseCodeSeq_course_s:da* | authorLastName_product_s:da* |  
Index_Type_s:da*

| prdMainTitle_s:da*^10.0 | discCode_course_s:da* |
sourceGroupName_course_s:da* | indexType_course_s:da* |
prdMainTitle_product_s:da* | isbn10_product_s:da* |  
displayName_course_s:da*

| groupNm_program_s:da* | discipline_product_s:da* |
courseJacketImage_course_s:da* | imprint_product_s:da* |
introText_program_s:da* | productType_product_s:da* |  
isbn13_product_s:da* |

copyrightYear_product_s:da* | prdPubDate_product_s:da* |
programType_program_s:da* | editor_product_s:da* |  
courseType_course_s:da* |
productURL_s:da*^1.0 | courseId_course_s:da* |  
categoryIds_product_s:da*

| indexType_program_s:da* | strapline_product_s:da* |
subCompany_course_s:da* | aluminator_product_s:da* |  
readBy_product_s:da* |

subject_product_s:da* | edition_product_s:da* |
programId_program_s:da*)~0.01 () all:english^90.0 all:hindi^123.0
all:glorious^2000.0 all:highlight^1.0E7 all:math^100.0 all:ab^12.0
all:erer^4545.0 all:"(prd prd main prd main titl prd main titl s)  
(main main
titl main titl s) (titl titl s) s"^10.0 all:"(product product url  
product

url s) (url url s) s"^1.0
 
 DismaxQParser
 
- 
 english^90 hindi^123 Glorious^2000 highlighting^1000  
maths^100

ab^12 erer^4545 prdMainTitle_s^10.0 productURL_s^1.0
 
- 
 all:english^90.0 all:hindi^123.0 all:glorious^2000.0
all:highlight^1.0E7 all:math^100.0 all:ab^12.0 all:erer^4545.0
MultiPhraseQuery(all:"(prd prd main prd main titl prd main titl s)  
(main
main titl main titl s) (titl titl s) s"^10.0)  
MultiPhraseQuery(all:"(product

product url product url s) (url url s) s"^1.0)
 
- 
 
 
- 
 32.0
- 
 16.0
- 
 16.0
 
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
 
- 
 16.0
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
- 
 0.0
 
- 
 16.0
 
 
 
 
 


Also, even if works, would I be able to achieve the field boosting  
with q

query parameter.

Thanks,
Amit Garg

Erik Hatcher wrote:



On Mar 2, 2009, at 10:15 AM, dabboo wrote:

Thanks for the information. I gave it in my url as the request
parameter like

http://localhost:8080/apache-solr-1.3.0/CORE_WWW.BLUEHEN.COM/select/?q=da*&version=2.2&start=0&rows=10&indent=on&qt=dismaxrequest&defType=lucene

But still results are the same. It is not displaying any records.

Please suggest.


How is your dismaxrequest request handler defined?   For example, if
you have an invariant defType set there, then setting defType on the
request would be ignored.

Also, what do you get for a parsed query when setting  
&debugQuery=true?


Erik





--
View this message in context: 
http://www.nabble.com/Difference-between-q-and-q.alt-parameter-query-tp22286561p22302203.html
Sent from the Solr - User mailing list archive at Nabble.com.




Re: Can find solr jars in WEB-INF/lib directory

2009-03-03 Thread Erik Hatcher


On Mar 3, 2009, at 3:01 AM, The Flight Captain wrote:
I am wrapping CoreContainer in my own class (FacetServerImpl), so  
that I can
override the query(SolrRequest request) method to return an xml  
String. This
is the best way I found to get an xml response from Solr, without  
deploying

solr as a service, note that EmbeddedSolrServer returns a NamedList.


Maybe DirectSolrConnection is a better fit for your use?

I have also tried putting apache-solr-core-nightly.jar in the lib  
directory

under Solr Home.


Solr doesn't load all classes through SolrResourceLoader, only  
specific plugin points.



How can I make the apache-solr-core-nightly.jar available to
ContextLoaderListener during bootstrapping of my Web Application?


put it in WEB-INF/lib??

Erik



Re: Field Boosting with q.alt parameter Query

2009-03-03 Thread Erik Hatcher


On Mar 3, 2009, at 3:35 AM, dabboo wrote:

Is there any way, we can implement field boosting with q.alt parameter
query. I would appreciate if somebody can suggest if there is any  
workaround

for the same.


The question really is not about q.alt specifically, but about query  
parsers.  With the caveats we've already noted about dismax (doesn't  
support wildcards), you can do something like this:


  http://localhost:8983/solr/select?rows=0&debugQuery=true&defType=dismax&q.alt= 
{!dismax%20qf=$qf}ipod&qf=name^5+features


The reason the embedded qf is needed is because the global params are  
not visible to the local query parser specified, and an indirection is  
needed because the desired qf has spaces in it.


Erik



Re: Difference between q and q.alt parameter query

2009-03-03 Thread dabboo

Hi Eric,

Thanks a lot for the information. How I can add the clauses for boosting
like bq. I have field names like "prodMainTitle_s" etc. Do you mean that I
should add the field boosting in bq entry in solrConfig file.

Please suggest.

Thanks,
Amit Garg



Erik Hatcher wrote:
> 
> The dismax parser does not support wildcard queries currently (but see  
> also SOLR-756).  Again, use defType=lucene to get that capability.   
> But, you will lose the qf field specific boosting capability.  You  
> can, however, OR in additional clauses for boosting (like the dismax  
> bq does).
> 
> Query parsing is tricky business.  Mark Miller blogged a great entry  
> about the various options available:
>   >
> 
>   Erik
> 
> On Mar 2, 2009, at 11:06 PM, dabboo wrote:
> 
>>
>> Here is what I am getting with debugQuery=true
>>
>> 
>> - 
>> - 
>>  0
>>  110
>> - 
>>  10
>>  0
>>  lucene
>>  on
>>  da*
>>  dismaxrequest
>>  true
>>  2.2
>>  
>>  
>>  
>> - 
>>  da*
>>  da*
>>  > name="parsedquery"> 
>> +DisjunctionMaxQuery((programJacketImage_program_s:da* |
>> courseCodeSeq_course_s:da* | authorLastName_product_s:da* |  
>> Index_Type_s:da*
>> | prdMainTitle_s:da*^10.0 | discCode_course_s:da* |
>> sourceGroupName_course_s:da* | indexType_course_s:da* |
>> prdMainTitle_product_s:da* | isbn10_product_s:da* |  
>> displayName_course_s:da*
>> | groupNm_program_s:da* | discipline_product_s:da* |
>> courseJacketImage_course_s:da* | imprint_product_s:da* |
>> introText_program_s:da* | productType_product_s:da* |  
>> isbn13_product_s:da* |
>> copyrightYear_product_s:da* | prdPubDate_product_s:da* |
>> programType_program_s:da* | editor_product_s:da* |  
>> courseType_course_s:da* |
>> productURL_s:da*^1.0 | courseId_course_s:da* |  
>> categoryIds_product_s:da*
>> | indexType_program_s:da* | strapline_product_s:da* |
>> subCompany_course_s:da* | aluminator_product_s:da* |  
>> readBy_product_s:da* |
>> subject_product_s:da* | edition_product_s:da* |
>> programId_program_s:da*)~0.01) () all:english^90.0 all:hindi^123.0
>> all:glorious^2000.0 all:highlight^1.0E7 all:math^100.0 all:ab^12.0
>> all:erer^4545.0 MultiPhraseQuery(all:"(prd prd main prd main titl  
>> prd main
>> titl s) (main main titl main titl s) (titl titl s) s"^10.0)
>> MultiPhraseQuery(all:"(product product url product url s) (url url s)
>> s"^1.0)
>>  +(programJacketImage_program_s:da* |
>> courseCodeSeq_course_s:da* | authorLastName_product_s:da* |  
>> Index_Type_s:da*
>> | prdMainTitle_s:da*^10.0 | discCode_course_s:da* |
>> sourceGroupName_course_s:da* | indexType_course_s:da* |
>> prdMainTitle_product_s:da* | isbn10_product_s:da* |  
>> displayName_course_s:da*
>> | groupNm_program_s:da* | discipline_product_s:da* |
>> courseJacketImage_course_s:da* | imprint_product_s:da* |
>> introText_program_s:da* | productType_product_s:da* |  
>> isbn13_product_s:da* |
>> copyrightYear_product_s:da* | prdPubDate_product_s:da* |
>> programType_program_s:da* | editor_product_s:da* |  
>> courseType_course_s:da* |
>> productURL_s:da*^1.0 | courseId_course_s:da* |  
>> categoryIds_product_s:da*
>> | indexType_program_s:da* | strapline_product_s:da* |
>> subCompany_course_s:da* | aluminator_product_s:da* |  
>> readBy_product_s:da* |
>> subject_product_s:da* | edition_product_s:da* |
>> programId_program_s:da*)~0.01 () all:english^90.0 all:hindi^123.0
>> all:glorious^2000.0 all:highlight^1.0E7 all:math^100.0 all:ab^12.0
>> all:erer^4545.0 all:"(prd prd main prd main titl prd main titl s)  
>> (main main
>> titl main titl s) (titl titl s) s"^10.0 all:"(product product url  
>> product
>> url s) (url url s) s"^1.0
>>  
>>  DismaxQParser
>>  
>> - 
>>  english^90 hindi^123 Glorious^2000 highlighting^1000  
>> maths^100
>> ab^12 erer^4545 prdMainTitle_s^10.0 productURL_s^1.0
>>  
>> - 
>>  all:english^90.0 all:hindi^123.0 all:glorious^2000.0
>> all:highlight^1.0E7 all:math^100.0 all:ab^12.0 all:erer^4545.0
>> MultiPhraseQuery(all:"(prd prd main prd main titl prd main titl s)  
>> (main
>> main titl main titl s) (titl titl s) s"^10.0)  
>> MultiPhraseQuery(all:"(product
>> product url product url s) (url url s) s"^1.0)
>>  
>> - 
>>  
>>  
>> - 
>>  32.0
>> - 
>>  16.0
>> - 
>>  16.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>>  
>> - 
>>  16.0
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  0.0
>>  
>> - 
>>  16.0
>>  
>>  
>>  
>>  
>>  
>>
>>
>> Also, even if works, would I be able to achieve the field boosting  
>> with q
>> query parameter.
>>
>> Thanks,
>> Amit Garg
>>
>> Erik Hatcher wrote:
>>>
>>>
>>> On Mar 2, 2009, at 10:15 AM, dabboo wrote:
 Thanks for the information. I gave it in my url as the request
 parameter like

 http://localhost:8080/apache-solr-1.3.0/CORE_WWW.BLUEHEN.COM/select/?q=da*&version=2.2&start=0&rows=10&indent=on&qt=dismaxrequest&de

Re: javax.xml.stream.XMLStreamException while posting

2009-03-03 Thread Pooja Verlani
Thanks it did work with the standard woodstox parser in the resin
configuration file.

Regards,
Pooja

On Mon, Mar 2, 2009 at 9:55 PM, Walter Underwood wrote:

> Also, open your document in a browser to make sure that it really is
> well-formed. Most browsers will pinpoint the syntax error. --wunder
>
> On 3/2/09 6:46 AM, "Noble Paul നോബിള്‍  नोब्ळ्" 
> wrote:
>
> > the parser you are using is not the standard woodstox one.
> > try this http://docs.sun.com/app/docs/doc/819-3672/gfkoy?a=view
> >
> > On Mon, Mar 2, 2009 at 6:24 PM, Pooja Verlani 
> wrote:
> >> Hi,
> >> When I posting a valid xml document to solr, its giving the following
> error:
> >>
> >> {http--10003-7} javax.xml.stream.XMLStreamException: :2:20 expected '-'
> at
> >> '['
> >> {http--10003-7} at
> >>
>
> com.caucho.xml.stream.XMLStreamReaderImpl.error(XMLStreamReaderImpl.java:1268>>
> )
> >> {http--10003-7} at
> >>
> com.caucho.xml.stream.XMLStreamReaderImpl.expect(XMLStreamReaderImpl.java:112
> >> 7)
> >> {http--10003-7} at
> >>
> com.caucho.xml.stream.XMLStreamReaderImpl.readNext(XMLStreamReaderImpl.java:6
> >> 42)
> >> {http--10003-7} at
> >>
> com.caucho.xml.stream.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:594)
> >> {http--10003-7} at
> >>
> org.apache.solr.handler.XmlUpdateRequestHandler.readDoc(XmlUpdateRequestHandl
> >> er.java:321)
> >> {http--10003-7} at
> >>
> org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateReques
> >> tHandler.java:195)
> >> {http--10003-7} at
> >>
> org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRe
> >> questHandler.java:123)
> >> {http--10003-7} at
> >>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.j
> >> ava:131)
> >> {http--10003-7} at
> >> org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
> >> {http--10003-7} at
> >>
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:30
> >> 3)
> >> {http--10003-7} at
> >>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:2
> >> 32)
> >> {http--10003-7} at
> >>
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:
> >> 87)
> >> {http--10003-7} at
> >>
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:18
> >> 7)
> >> {http--10003-7} at
> >>
> com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:2
> >> 66)
> >> {http--10003-7} at
> >> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:270)
> >> {http--10003-7} at
> >> com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)
> >> {http--10003-7} at
> >> com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
> >> {http--10003-7} at
> >> com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
> >> {http--10003-7} at java.lang.Thread.run(Thread.java:619)
> >>
> >> No matter what I do with the xmls, it is recurring. I am using solr 1.3
> with
> >> resin 3.1.6 on Intel Xeon with CentOS 4.6 release. The java version I am
> >> using is 1.6.0_10.
> >> Please let me know if someone can throw some light on it :)
> >>
> >> Thank you,
> >>
> >> Regards,
> >> Pooja
> >>
> >
> >
>
>


Re: Field Boosting with q.alt parameter Query

2009-03-03 Thread dabboo

Hi,

I tried this url but it threw nullpointer exception. Also, I am having
underscores in the field name like ProductUrl_s etc.
I also debug the query which gets formed with q.alt, it doesnt calculate the
scores of the documents and hence doesnt support field boosting.

Please suggest me as how I can achieve the field boosting with this q.alt
parameter.

Thanks,
Amit Garg



dabboo wrote:
> 
> Hi,
> 
> Is there any way, we can implement field boosting with q.alt parameter
> query. I would appreciate if somebody can suggest if there is any
> workaround for the same.
> 
> Thanks,
> Amit Garg
> 

-- 
View this message in context: 
http://www.nabble.com/Field-Boosting-with-q.alt-parameter-Query-tp22304491p22305790.html
Sent from the Solr - User mailing list archive at Nabble.com.



Phrase Query

2009-03-03 Thread dabboo

Hi,

I want to search "tes*t", where "*" is not considering as wildcard but as
character. So, I am expecting the results which have tes*t as string as one
of their field value.

Please suggest how to achieve it.

Thanks,
Amit Garg
-- 
View this message in context: 
http://www.nabble.com/Phrase-Query-tp22308387p22308387.html
Sent from the Solr - User mailing list archive at Nabble.com.



Possible bug in spellchecker result

2009-03-03 Thread Markus Jelsma - Buyways B.V.
L.S.



There seems to be a bug in the PHPS outputHandler when retrieving a
query that also produces spellcheck results.

The following query fails to return an unserializable string:
spellcheck=true&facet=true&indent=on&facet.mincount=1&spellcheck.extendedResults=true&
spellcheck.q=groninen&spellcheck.collate=true&wt=phps&rows=8&start=0&
q=generic_search:groninen&spellcheck.dictionary=jarowinkler&
facet.field=city&facet.field=kitchen&facet.field=budget

The problem is clearly visible at the end of the returned string:
rectlySpelled";falses:9:"collation";s:9:"groningen";}}}

The query works fine when extendedResults=false, otherwise this problem
occurs.

Using the PHP outputHandler instead also produces a result which i
cannot pass through eval. It complains about the last line of the result
which omits the semi colon.

 'word'=>'groningen')),
'correctlySpelled'=>false,
'collation'=>'groningen')))

It would also need a return statement to begin with in order to produce
any results with eval. For a - simple - query to work properly you would
need : 
$data = file_get_contents(query);
var_dump(eval("return $data;"));



Any hints on some workarounds?



Regards,



Re: Phrase Query

2009-03-03 Thread Erik Hatcher


On Mar 3, 2009, at 8:13 AM, dabboo wrote:
I want to search "tes*t", where "*" is not considering as wildcard  
but as
character. So, I am expecting the results which have tes*t as string  
as one

of their field value.

Please suggest how to achieve it.


This requires escaping the special characters with a backslash \.
The query sent to Solr should would be q=tes\*t


Though this has nothing to do with the subject "Phrase Query".

Erik



Re: Field Boosting with q.alt parameter Query

2009-03-03 Thread Erik Hatcher

Amit,

If you use the lucene query parser, you only get a q parameter.  All  
the other parameters, such as qf and bq, are specific to the dismax  
query parser.  If you want to use the lucene query parser for wildcard  
capability, you have to manually build the query across multiple  
fields and boosts.


If you use the dismax parser, there is no wildcard query capability.

These are the limitations of what the query parsers currently built  
into Solr.


As for the URL throwing a null pointer exception - please send the  
relevant details (what URL was it?  What was the complete stack  
trace?  What version of Solr?)


Erik

On Mar 3, 2009, at 5:21 AM, dabboo wrote:



Hi,

I tried this url but it threw nullpointer exception. Also, I am having
underscores in the field name like ProductUrl_s etc.
I also debug the query which gets formed with q.alt, it doesnt  
calculate the

scores of the documents and hence doesnt support field boosting.

Please suggest me as how I can achieve the field boosting with this  
q.alt

parameter.

Thanks,
Amit Garg



dabboo wrote:


Hi,

Is there any way, we can implement field boosting with q.alt  
parameter

query. I would appreciate if somebody can suggest if there is any
workaround for the same.

Thanks,
Amit Garg



--
View this message in context: 
http://www.nabble.com/Field-Boosting-with-q.alt-parameter-Query-tp22304491p22305790.html
Sent from the Solr - User mailing list archive at Nabble.com.




Phrases in Synonyms.txt

2009-03-03 Thread Vernon Chapman
I have a thesaurus that I would like to dump into the synonyms.txt In my 
thesaurus I have a term swine that

has a property called use_for which in my case is essentially a synonym.

The json representation of the term swine from my solr based thesaurus is:

{
 "term":"swine",
 "usefor":[
  "hogs",
  "pigs",
  "porcine",
  "Sus scrofa domestica"]
}


In an effort to expand my users results, I would like to use the terms 
in the "usefor" property as synonyms in the synonyms.txt file.

As far as I can tell this would work fine  in synonyms.txt

swine => hogs,pigs,porcine

The question is how would/could I add the final option "Sus scrofa 
domestica" to the list of synonyms for swine 
would any of these work or am I totally off base here?


1) swine => hogs,pigs,porcine,"Sus scrofa domestica"
2) swine => hogs,pigs,porcine,"Sus\ scrofa\ domestica"

Thanks in advance





Re: solr and tomcat

2009-03-03 Thread Matthew Runo
It looks like if you set a -Dsolr.data.dir=foo then you could specify  
where the index would be stored, yes?  Are you properly setting your  
solr.home? I've never had to set the data directory specifically, Solr  
has always put it under my home.


From solrconfig.xml:
 ${solr.data.dir:./solr/data}

Since Solr is running under tomcat, I'd assume that the index will  
always appear to be owned by tomcat as well. I don't think there is  
any way to have a different user for the written files - but someone  
else might want to chime in before you believe me 100% on this one.


Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote:


Hi. I'm sorry if this is the second time this message comes through!

A few questions here...

#1
Does anyone know how to set the user/group and/or permissions on the  
index
that solr creates? It's always the tomcat user. Is it possible to  
change

this in my context file? Help!

#2
I'm deploying Solr via Tomcat and really thought I had this stuff  
down. But
it seems that with some recent system upgrades, my scheme is failing  
to set

the data dir correctly.

I'm deploying solr to tomcat, using a context file as described here:
http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac

But when I deploy, Tomcat says that it can't find a ./data/index  
directory

-- relative to the tomcat home directory. How can I set the data dir
relative to the solr home value I'm specifying in the tomcat context  
file?

Note: a hard-coded absolute path works, but I want to configure at
deployment time.

In the past, I tried setting the data dir in the same way the solr  
home is
set in the context file without luck. Does this now work in the  
latest solr

nightly?

Thanks,




Re: solr and tomcat

2009-03-03 Thread Matt Mitchell
Hi Matthew,

The problem is that we have multiple instances of solr running under one
tomcat. So setting -Dsolr.data.dir=foo would set the home for every solr. I
guess multi-core might solve my problem, but that'd change our app
architecture too much, maybe some other day.

I *kind* of have a solution for the permissions thing though:

- The project user is part of the tomcat group.
- The tomcat user is part of the project user group.
- We're making a call to "umask 002" in the tomcat catalina.sh file (means
all files created will have group write)

So when solr (tomcat) creates the index, they're group writable now and I
can remove etc.!

So, I still need to figure out the data.dir problem. Hmm.

Thanks for your help,
Matt

On Tue, Mar 3, 2009 at 11:31 AM, Matthew Runo  wrote:

> It looks like if you set a -Dsolr.data.dir=foo then you could specify where
> the index would be stored, yes?  Are you properly setting your solr.home?
> I've never had to set the data directory specifically, Solr has always put
> it under my home.
>
> From solrconfig.xml:
>  ${solr.data.dir:./solr/data}
>
> Since Solr is running under tomcat, I'd assume that the index will always
> appear to be owned by tomcat as well. I don't think there is any way to have
> a different user for the written files - but someone else might want to
> chime in before you believe me 100% on this one.
>
> Thanks for your time!
>
> Matthew Runo
> Software Engineer, Zappos.com
> mr...@zappos.com - 702-943-7833
>
>
> On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote:
>
>  Hi. I'm sorry if this is the second time this message comes through!
>>
>> A few questions here...
>>
>> #1
>> Does anyone know how to set the user/group and/or permissions on the index
>> that solr creates? It's always the tomcat user. Is it possible to change
>> this in my context file? Help!
>>
>> #2
>> I'm deploying Solr via Tomcat and really thought I had this stuff down.
>> But
>> it seems that with some recent system upgrades, my scheme is failing to
>> set
>> the data dir correctly.
>>
>> I'm deploying solr to tomcat, using a context file as described here:
>>
>> http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac
>>
>> But when I deploy, Tomcat says that it can't find a ./data/index directory
>> -- relative to the tomcat home directory. How can I set the data dir
>> relative to the solr home value I'm specifying in the tomcat context file?
>> Note: a hard-coded absolute path works, but I want to configure at
>> deployment time.
>>
>> In the past, I tried setting the data dir in the same way the solr home is
>> set in the context file without luck. Does this now work in the latest
>> solr
>> nightly?
>>
>> Thanks,
>>
>
>


Re: solr and tomcat

2009-03-03 Thread Matthew Runo
Perhaps you could hard code it in the solrconfig.xml file for each  
solr instance? Other than that, what we did was run multiple instances  
of Tomcat. That way if something goes bad in one, it doesn't affect  
the others.


Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Mar 3, 2009, at 8:39 AM, Matt Mitchell wrote:


Hi Matthew,

The problem is that we have multiple instances of solr running under  
one
tomcat. So setting -Dsolr.data.dir=foo would set the home for every  
solr. I

guess multi-core might solve my problem, but that'd change our app
architecture too much, maybe some other day.

I *kind* of have a solution for the permissions thing though:

- The project user is part of the tomcat group.
- The tomcat user is part of the project user group.
- We're making a call to "umask 002" in the tomcat catalina.sh file  
(means

all files created will have group write)

So when solr (tomcat) creates the index, they're group writable now  
and I

can remove etc.!

So, I still need to figure out the data.dir problem. Hmm.

Thanks for your help,
Matt

On Tue, Mar 3, 2009 at 11:31 AM, Matthew Runo   
wrote:


It looks like if you set a -Dsolr.data.dir=foo then you could  
specify where
the index would be stored, yes?  Are you properly setting your  
solr.home?
I've never had to set the data directory specifically, Solr has  
always put

it under my home.

From solrconfig.xml:
${solr.data.dir:./solr/data}

Since Solr is running under tomcat, I'd assume that the index will  
always
appear to be owned by tomcat as well. I don't think there is any  
way to have
a different user for the written files - but someone else might  
want to

chime in before you believe me 100% on this one.

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833


On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote:

Hi. I'm sorry if this is the second time this message comes through!


A few questions here...

#1
Does anyone know how to set the user/group and/or permissions on  
the index
that solr creates? It's always the tomcat user. Is it possible to  
change

this in my context file? Help!

#2
I'm deploying Solr via Tomcat and really thought I had this stuff  
down.

But
it seems that with some recent system upgrades, my scheme is  
failing to

set
the data dir correctly.

I'm deploying solr to tomcat, using a context file as described  
here:


http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac

But when I deploy, Tomcat says that it can't find a ./data/index  
directory

-- relative to the tomcat home directory. How can I set the data dir
relative to the solr home value I'm specifying in the tomcat  
context file?

Note: a hard-coded absolute path works, but I want to configure at
deployment time.

In the past, I tried setting the data dir in the same way the solr  
home is
set in the context file without luck. Does this now work in the  
latest

solr
nightly?

Thanks,








Re: solr and tomcat

2009-03-03 Thread Matt Mitchell
That's exactly what we're doing (setting the value in each config). The main
problem with that is we have multiple people working on each of these solr
projects, in different environments. Their data.dir path is always the same
(relative) value which works fine under Jetty. But running under tomcat, the
data dir is relative to tomcat's home. So an absolute hard-coded path is the
only solution. My hope was that we'd be able to override it using the same
method as setting the "solr/home" value in the tomcat context file.

The thought of running multiple tomcats is interesting. Do you have any
issues with memory or cpu performance?

Thanks,
Matt

On Tue, Mar 3, 2009 at 11:45 AM, Matthew Runo  wrote:

> Perhaps you could hard code it in the solrconfig.xml file for each solr
> instance? Other than that, what we did was run multiple instances of Tomcat.
> That way if something goes bad in one, it doesn't affect the others.
>
> Thanks for your time!
>
> Matthew Runo
> Software Engineer, Zappos.com
> mr...@zappos.com - 702-943-7833
>
> On Mar 3, 2009, at 8:39 AM, Matt Mitchell wrote:
>
>  Hi Matthew,
>>
>> The problem is that we have multiple instances of solr running under one
>> tomcat. So setting -Dsolr.data.dir=foo would set the home for every solr.
>> I
>> guess multi-core might solve my problem, but that'd change our app
>> architecture too much, maybe some other day.
>>
>> I *kind* of have a solution for the permissions thing though:
>>
>> - The project user is part of the tomcat group.
>> - The tomcat user is part of the project user group.
>> - We're making a call to "umask 002" in the tomcat catalina.sh file (means
>> all files created will have group write)
>>
>> So when solr (tomcat) creates the index, they're group writable now and I
>> can remove etc.!
>>
>> So, I still need to figure out the data.dir problem. Hmm.
>>
>> Thanks for your help,
>> Matt
>>
>> On Tue, Mar 3, 2009 at 11:31 AM, Matthew Runo  wrote:
>>
>>  It looks like if you set a -Dsolr.data.dir=foo then you could specify
>>> where
>>> the index would be stored, yes?  Are you properly setting your solr.home?
>>> I've never had to set the data directory specifically, Solr has always
>>> put
>>> it under my home.
>>>
>>> From solrconfig.xml:
>>> ${solr.data.dir:./solr/data}
>>>
>>> Since Solr is running under tomcat, I'd assume that the index will always
>>> appear to be owned by tomcat as well. I don't think there is any way to
>>> have
>>> a different user for the written files - but someone else might want to
>>> chime in before you believe me 100% on this one.
>>>
>>> Thanks for your time!
>>>
>>> Matthew Runo
>>> Software Engineer, Zappos.com
>>> mr...@zappos.com - 702-943-7833
>>>
>>>
>>> On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote:
>>>
>>> Hi. I'm sorry if this is the second time this message comes through!
>>>

 A few questions here...

 #1
 Does anyone know how to set the user/group and/or permissions on the
 index
 that solr creates? It's always the tomcat user. Is it possible to change
 this in my context file? Help!

 #2
 I'm deploying Solr via Tomcat and really thought I had this stuff down.
 But
 it seems that with some recent system upgrades, my scheme is failing to
 set
 the data dir correctly.

 I'm deploying solr to tomcat, using a context file as described here:


 http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac

 But when I deploy, Tomcat says that it can't find a ./data/index
 directory
 -- relative to the tomcat home directory. How can I set the data dir
 relative to the solr home value I'm specifying in the tomcat context
 file?
 Note: a hard-coded absolute path works, but I want to configure at
 deployment time.

 In the past, I tried setting the data dir in the same way the solr home
 is
 set in the context file without luck. Does this now work in the latest
 solr
 nightly?

 Thanks,


>>>
>>>
>


datadir issue for multicore on latest trunk

2009-03-03 Thread Walter Ferrara
there is a strange behavior which seems to affect hudson today (March 3rd)
build but not (for example) hudson February 2th build.
Basically when I start the multicore enviroment, it just create datadir in
the current path.
To replicate:
1. download latest trunk
2. go to example directory

$ ls
README.txt  example-DIH  exampledocs  logs   solr  start.jar
work
etc exampleAnalysis  lib  multicore  start.bat  webapps

$ java -Dsolr.solr.home=multicore -jar start.jar
(then kill/sleep the process)

$ ls
README.txt  etc  exampledocs  multicore  start.jar
core0   example-DIH  lib  solr  webapps
core1   exampleAnalysis  logs start.bat  work

you see core0 and core1 directory where they should not be :-); solr-1041
doesn't fix in this case.

ciao,
Walter


Re: solr and tomcat

2009-03-03 Thread Matthew Runo
I see where your problems come in then. I'm not sure of the answer  
though =\


We've not had issues running multiple tomcat instances per server. I  
think at one point a few weeks ago we ran 6 instances per server, on  
quad core Xeon servers with 16gb of ram. Our use case might be  
different than yours though - each of these instances was basically  
the same for us (getting around a lucene sync issue) and they were all  
load balanced together so no single instance got more than a few  
requests per second.


Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Mar 3, 2009, at 8:53 AM, Matt Mitchell wrote:

That's exactly what we're doing (setting the value in each config).  
The main
problem with that is we have multiple people working on each of  
these solr
projects, in different environments. Their data.dir path is always  
the same
(relative) value which works fine under Jetty. But running under  
tomcat, the
data dir is relative to tomcat's home. So an absolute hard-coded  
path is the
only solution. My hope was that we'd be able to override it using  
the same

method as setting the "solr/home" value in the tomcat context file.

The thought of running multiple tomcats is interesting. Do you have  
any

issues with memory or cpu performance?

Thanks,
Matt

On Tue, Mar 3, 2009 at 11:45 AM, Matthew Runo   
wrote:


Perhaps you could hard code it in the solrconfig.xml file for each  
solr
instance? Other than that, what we did was run multiple instances  
of Tomcat.

That way if something goes bad in one, it doesn't affect the others.

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Mar 3, 2009, at 8:39 AM, Matt Mitchell wrote:

Hi Matthew,


The problem is that we have multiple instances of solr running  
under one
tomcat. So setting -Dsolr.data.dir=foo would set the home for  
every solr.

I
guess multi-core might solve my problem, but that'd change our app
architecture too much, maybe some other day.

I *kind* of have a solution for the permissions thing though:

- The project user is part of the tomcat group.
- The tomcat user is part of the project user group.
- We're making a call to "umask 002" in the tomcat catalina.sh  
file (means

all files created will have group write)

So when solr (tomcat) creates the index, they're group writable  
now and I

can remove etc.!

So, I still need to figure out the data.dir problem. Hmm.

Thanks for your help,
Matt

On Tue, Mar 3, 2009 at 11:31 AM, Matthew Runo   
wrote:


It looks like if you set a -Dsolr.data.dir=foo then you could  
specify

where
the index would be stored, yes?  Are you properly setting your  
solr.home?
I've never had to set the data directory specifically, Solr has  
always

put
it under my home.

From solrconfig.xml:
${solr.data.dir:./solr/data}

Since Solr is running under tomcat, I'd assume that the index  
will always
appear to be owned by tomcat as well. I don't think there is any  
way to

have
a different user for the written files - but someone else might  
want to

chime in before you believe me 100% on this one.

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833


On Mar 2, 2009, at 5:46 PM, Matt Mitchell wrote:

Hi. I'm sorry if this is the second time this message comes  
through!




A few questions here...

#1
Does anyone know how to set the user/group and/or permissions on  
the

index
that solr creates? It's always the tomcat user. Is it possible  
to change

this in my context file? Help!

#2
I'm deploying Solr via Tomcat and really thought I had this  
stuff down.

But
it seems that with some recent system upgrades, my scheme is  
failing to

set
the data dir correctly.

I'm deploying solr to tomcat, using a context file as described  
here:



http://wiki.apache.org/solr/SolrTomcat#head-024d7e11209030f1dbcac9974e55106abae837ac

But when I deploy, Tomcat says that it can't find a ./data/index
directory
-- relative to the tomcat home directory. How can I set the data  
dir
relative to the solr home value I'm specifying in the tomcat  
context

file?
Note: a hard-coded absolute path works, but I want to configure at
deployment time.

In the past, I tried setting the data dir in the same way the  
solr home

is
set in the context file without luck. Does this now work in the  
latest

solr
nightly?

Thanks,











Re: How to use spell checker

2009-03-03 Thread Grant Ingersoll

See http://wiki.apache.org/solr/SpellCheckComponent


On Mar 3, 2009, at 1:23 AM, dabboo wrote:



Hi,

I am trying to implement the spell check feature in solr with  
lucene. for
e.g. if any record contains "elephants" and user enters "elepents",  
even

then also, it should return the results with the correct spelling i.e.
"elephants".

Please suggest.

Thanks,
Amit Garg
--
View this message in context: 
http://www.nabble.com/How-to-use-spell-checker-tp22303127p22303127.html
Sent from the Solr - User mailing list archive at Nabble.com.



--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: org.apache.lucene.analysis.tokenattributes package

2009-03-03 Thread Grant Ingersoll

Those are in the Lucene core JAR.

On Feb 25, 2009, at 11:46 PM, dabboo wrote:



Hi,

I am trying to override getFieldQuery method of QueryParser class,  
which

uses 2 classed i.e. PositionIncrementAttribute & TokenAttribute of
org.apache.lucene.analysis.tokenattributes package. I\
I am not able to find out this package.

Please help.

Thanks,
Amit Garg
--
View this message in context: 
http://www.nabble.com/org.apache.lucene.analysis.tokenattributes-package-tp22217615p22217615.html
Sent from the Solr - User mailing list archive at Nabble.com.



--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Very long commit time.

2009-03-03 Thread Jérôme Etévé
Dear solr fans,

  I have a solr index of roughly 8M docs and I have here a little
problem when I commit some insertion into it.

  The insert itself is very fast, but my commit takes 163 seconds.

  Here's the solr trace the commit leaves:

  INFO: start commit(optimize=false,waitFlush=false,waitSearcher=true)
  03-Mar-2009 20:20:35 org.apache.solr.search.SolrIndexSearcher 
INFO: Opening searc...@7de212f9 main
03-Mar-2009 20:20:35 org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
03-Mar-2009 20:20:35 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main

filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=71641,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}
03-Mar-2009 20:21:52 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for searc...@7de212f9 main

filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=76905,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}
03-Mar-2009 20:21:52 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main

queryResultCache{lookups=24,hits=24,hitratio=1.00,inserts=32,evictions=0,size=32,warmupTime=82406,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}
03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for searc...@7de212f9 main

queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=32,evictions=0,size=32,warmupTime=85591,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}
03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main

documentCache{lookups=720,hits=710,hitratio=0.98,inserts=40,evictions=0,size=40,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for searc...@7de212f9 main

documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
03-Mar-2009 20:23:17 org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to searc...@7de212f9 main

// Then the few warm up queries defined in solrconfig.xml

INFO: Closing searc...@732d8b11 main

filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=71641,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}

queryResultCache{lookups=24,hits=24,hitratio=1.00,inserts=32,evictions=0,size=32,warmupTime=82406,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}

documentCache{lookups=720,hits=710,hitratio=0.98,inserts=40,evictions=0,size=40,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
03-Mar-2009 20:23:18 org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {commit=} 0 163189
03-Mar-2009 20:23:18 org.apache.solr.core.SolrCore execute
INFO: [jobs] webapp=/cjsolr path=/update/ params={} status=0 QTime=163189


I'm sure I'm doing something wrong. Does this 163 seconds commit time
have to do with the commit parameters :
(optimize=false,waitFlush=false,waitSearcher=true)  ??

Thanks for any help.

Cheers !!

Jerome.

-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jer...@eteve.net


Re: Very long commit time.

2009-03-03 Thread Yonik Seeley
Looks like cache autowarming.
If you have statically defined warming queries in solrconfig.xml, you
could try setting autowarmCount=0 for all the caches.

-Yonik
http://www.lucidimagination.com


On Tue, Mar 3, 2009 at 2:37 PM, Jérôme Etévé  wrote:
> Dear solr fans,
>
>  I have a solr index of roughly 8M docs and I have here a little
> problem when I commit some insertion into it.
>
>  The insert itself is very fast, but my commit takes 163 seconds.
>
>  Here's the solr trace the commit leaves:
>
>  INFO: start commit(optimize=false,waitFlush=false,waitSearcher=true)
>  03-Mar-2009 20:20:35 org.apache.solr.search.SolrIndexSearcher 
> INFO: Opening searc...@7de212f9 main
> 03-Mar-2009 20:20:35 org.apache.solr.update.DirectUpdateHandler2 commit
> INFO: end_commit_flush
> 03-Mar-2009 20:20:35 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main
>        
> filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=71641,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}
> 03-Mar-2009 20:21:52 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming result for searc...@7de212f9 main
>        
> filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=76905,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}
> 03-Mar-2009 20:21:52 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main
>        
> queryResultCache{lookups=24,hits=24,hitratio=1.00,inserts=32,evictions=0,size=32,warmupTime=82406,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}
> 03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming result for searc...@7de212f9 main
>        
> queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=32,evictions=0,size=32,warmupTime=85591,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}
> 03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming searc...@7de212f9 main from searc...@732d8b11 main
>        
> documentCache{lookups=720,hits=710,hitratio=0.98,inserts=40,evictions=0,size=40,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
> 03-Mar-2009 20:23:17 org.apache.solr.search.SolrIndexSearcher warm
> INFO: autowarming result for searc...@7de212f9 main
>        
> documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
> 03-Mar-2009 20:23:17 org.apache.solr.core.QuerySenderListener newSearcher
> INFO: QuerySenderListener sending requests to searc...@7de212f9 main
>
> // Then the few warm up queries defined in solrconfig.xml
>
> INFO: Closing searc...@732d8b11 main
>        
> filterCache{lookups=0,hits=0,hitratio=0.00,inserts=16,evictions=0,size=16,warmupTime=71641,cumulative_lookups=90,cumulative_hits=68,cumulative_hitratio=0.75,cumulative_inserts=22,cumulative_evictions=0}
>        
> queryResultCache{lookups=24,hits=24,hitratio=1.00,inserts=32,evictions=0,size=32,warmupTime=82406,cumulative_lookups=6310,cumulative_hits=268,cumulative_hitratio=0.04,cumulative_inserts=6041,cumulative_evictions=5522}
>        
> documentCache{lookups=720,hits=710,hitratio=0.98,inserts=40,evictions=0,size=40,warmupTime=0,cumulative_lookups=415308,cumulative_hits=283661,cumulative_hitratio=0.68,cumulative_inserts=131647,cumulative_evictions=131105}
> 03-Mar-2009 20:23:18 org.apache.solr.update.processor.LogUpdateProcessor 
> finish
> INFO: {commit=} 0 163189
> 03-Mar-2009 20:23:18 org.apache.solr.core.SolrCore execute
> INFO: [jobs] webapp=/cjsolr path=/update/ params={} status=0 QTime=163189
>
>
> I'm sure I'm doing something wrong. Does this 163 seconds commit time
> have to do with the commit parameters :
> (optimize=false,waitFlush=false,waitSearcher=true)  ??
>
> Thanks for any help.
>
> Cheers !!
>
> Jerome.
>
> --
> Jerome Eteve.
>
> Chat with me live at http://www.eteve.net
>
> jer...@eteve.net
>


Spatial search using R-tree for indexed bounding boxes

2009-03-03 Thread Craig de Stigter
Hi list

We're in need of a spatial search extension to Solr, and it looks like we
might end up implementing it ourselves.

At first glance localsolr looked promising, but a closer look revealed that
each document has only a single point location, and querying is done via a
cartesian grid. Our documents have bounding rectangles, and we need to query
for intersection with a given extent (with ranking as some measure of
similarity of the two areas.) An existing one is already on our website at
www.koordinates.com .

The textbook solution is to use an R-tree as the index instead of a
cartesian grid. Does anyone know of any prior work implementing that for
Lucene/Solr? So far searching relevant places on the internet hasn't turned
up anything.

Are there any easily foreseeable problems with implementing an r-tree box
indexing/searching extension to Solr, in the spirit of localsolr? If anyone
has any pointers I'm all ears.

Regards
Craig de Stigter

-- 
Koordinates Ltd
PO Box 1604, Shortland St, Auckland, New Zealand
Phone +64-9-966 0433 Fax +64-9-969 0045
Web http://www.koordinates.com


Using large numbers of weighted tags to compare documents

2009-03-03 Thread Oloan, Aidan
I have a question regarding using large number of weighted tags in order to 
compare documents using Solr.

Basically, I have a set of domain objects, each of which has many properties, 
and from these I'm creating documents which are added to Solr. The properties 
are all being turned into tags, so the Solr document simply has a field to 
identify the object, and a large number of tags describing it (say on average ~ 
150 of these tags for each document). Right now the tags are bound to specific 
terms, but are sometimes accompanied with a numeric value. Each tag will need 
to be weighted since some of the properties are more significant for comparison 
than others.

Given one document, I want to be able to find similar documents by comparing 
the tags.   Should I utilize Term Vectors and MoreLikeThis functionality for 
this, or do Term Vectors only work with the frequency of the term (which will 
usually only be at most once for each tag in each document)? Should I be 
looking at the DisMax query handler instead in order to apply boosts to tag 
values?


Aidan


DataImportHandler and delta-import question

2009-03-03 Thread Garafola Timothy
I'm using solr 1.3 and am trying to get a delta-import with the DIH.
Recently the wiki, http://wiki.apache.org/solr/DataImportHandler, was
updated explaining that delta import is a 1.4 feature now but it was
still possible get a delta using the full import example here,
http://wiki.apache.org/solr/DataImportHandlerFaq#fullimportdelta.  I
tried this but each time I run DIH, it reimports all rows and updates.

Below is my data-config.xml.  I set rootEntity to false and issued
command=full-import&clean=false&optimize=false through DIH.  Am I
doing something wrong here or is the DataImportHandlerFaq incorrect?


























Thanks,
-Tim


Re: Spatial search using R-tree for indexed bounding boxes

2009-03-03 Thread Ryan McKinley


Are there any easily foreseeable problems with implementing an r- 
tree box
indexing/searching extension to Solr, in the spirit of localsolr? If  
anyone

has any pointers I'm all ears.


I have implemented an R-Tree based integration for solr.  It is pretty  
ugly and memory intensive, but works for now.  I plan to release it  
(or something like it) in the lucene spatial contrib sometime.  I am  
waiting to see what the "Flexible indexing" thread leads since that  
may be a good way to just build the R-Tree at index time rather then  
every time you open a searcher.


In my current approach, I store a string representing a bounding box.   
When you open a searcher, it walks through every document and builds  
an in memory R-Tree.  Then I have a solr query component that applies  
a filter based on what matches.


- - - - -

Patrick (of local lucene fame) thinks it is possible to do extent  
queries with the cartesian grid method -- essentially you select the  
"best fit" level and cell, and that should be set for anything within  
the extent.  The advantage of this approach is that it is super-fast  
and scaleable.  The disadvantage is that it is only as accurate as the  
grid.


ryan




Indexing issue

2009-03-03 Thread mahendra mahendra
Hi,
 
I have two cores in different machines which are referring to the same data 
directory.
I have implemented this mechanism to have fault tolerance in place, if any of 
the machines are down the fault tolerance take care to index data from other 
machine.
 
Since two cores are referring to the same data directory some times reindexing 
getting failed and it is showing the below error.
 
HTTP Status 500 - java.io.FileNotFoundException: 
\\SolrShare\CollectionSet2\English\Auction\Auction0\index\_c.fdt (The system 
cannot find the file specified) java.lang.RuntimeException: 
java.io.FileNotFoundException: 
\\SolrShare\CollectionSet2\English\Auction\Auction0\index\_c.fdt (The system 
cannot find the file specified) at 
org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:960) at 
org.apache.solr.core.SolrCore.(SolrCore.java:470) at 
org.apache.solr.core.CoreContainer.create(CoreContainer.java:323) at 
org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:107)
 at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204) at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303) 
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
 at
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 
I have changed lockType to simple and none, but still no luck…
Could you please correct me if I am doing wrong?
 
Thanks in advance!!
 
Regards,
Mahendra


  

convert Nutch index to Solr

2009-03-03 Thread Tony Wang
Hi,

I am using Nutch nightly build #736 (version 1.0?) to crawl and index, and I
would like to use Solr as the indexer. I wonder if there's a way to convert
Nutch indices to Solr?

Thanks!

Tony

-- 
Are you RCholic? www.RCholic.com
温 良 恭 俭 让 仁 义 礼 智 信


Re: DataImportHandler and delta-import question

2009-03-03 Thread Noble Paul നോബിള്‍ नोब्ळ्
I do not see anything wrong with this .It should have worked . Can you
check that dataimport.properties is created (by DIH) in the conf
directory? . check the content?


are you sure that the query

select DId from 2_Doc where ModifiedDate > '${dataimporter.last_index_time}'

works with  a date format -MM-dd HH:mm:ss . This is the format
which DIH sends the date in . If the format is wrong you may need to
format it using a dateformat function.

see here

http://wiki.apache.org/solr/DataImportHandler#head-5675e913396a42eb7c6c5d3c894ada5dadbb62d7


 The trunk DIH can work with Solr1.3 (you may need to put the DIH jar
and slf4j). Can

On Wed, Mar 4, 2009 at 3:53 AM, Garafola Timothy  wrote:
> I'm using solr 1.3 and am trying to get a delta-import with the DIH.
> Recently the wiki, http://wiki.apache.org/solr/DataImportHandler, was
> updated explaining that delta import is a 1.4 feature now but it was
> still possible get a delta using the full import example here,
> http://wiki.apache.org/solr/DataImportHandlerFaq#fullimportdelta.  I
> tried this but each time I run DIH, it reimports all rows and updates.
>
> Below is my data-config.xml.  I set rootEntity to false and issued
> command=full-import&clean=false&optimize=false through DIH.  Am I
> doing something wrong here or is the DataImportHandlerFaq incorrect?
>
> 
>         url="jdbc:mysql://pencil-somewhere.com:2/SomeDB" user="someUser"
>  password="somePassword"/>
>        
>                                        query = "select DId from 2_Doc where
> ModifiedDate > '${dataimporter.last_index_time}'
>                                      and DocType != 'Research Articles'">
>                         transformer="RegexTransformer"
>                                query = "SELECT d.DId, d.SiteId,
> d.DocTitle, d.DocURL, d.DocDesc,
>                                        d.DocType, d.Tags, d.Source,
> d.Last90DaysRFIsPercent,
>                                        d.ModifiedDate, d.DocGuid, d.Author,
>                                        i.Industry FROM 2_Doc d LEFT
> OUTER JOIN tmp_DocIndustry i
>                                        ON (d.DocId=i.DocId AND
> d.SiteId=i.SiteId) where d.DocType != 'Research articles'
>                                        and d.DId = '${item.DId}' and
> d.ModifiedDate > '${dataimporter.last_index_time}'">
>                                
>                                
>                                
>                                
>                                
>                                
>                                 regex="^(.{0,800})\b.*$" sourceColName="DocDesc"/>
>                                
>                                 splitBy=";" sourceColName="Tags"/>
>                                
>                                 "Last90DaysRFIsPercent"   name ="Last90DaysRFIsPercent"/>
>                                 ="ModifiedDate"/>
>                                
>                                
>                                 ="Industry" sourceColName="Industry"/>
>                        
>                
>        
> 
>
> Thanks,
> -Tim
>



-- 
--Noble Paul


Re: Shard Query Problem

2009-03-03 Thread Chris Hostetter

Anshul: It doesn't look like you ever got an answer to this question, did 
you ever find a solution?

I'm not very shard savy, but if the numFound is coming back non-zero, the 
best guess i have is that somewhere you are overridding the default "rows" 
param with a value of 0.

if that's not it: can you post your requestHandler configurations 
from solrconfig.xml? that might shed some light on things for people.

: Date: Thu, 19 Feb 2009 22:30:19 +0100
: From: Anshul jain
: Subject: Shard Query Problem
: 
: Hi,
: 
: I'm using distributed Solr with two machines.
: 
: when I query in URL: http://lca2-s5-pc04:8080/solr/select?&q=name:john
: I get  and 10 documents are
: shown.
: 
: when I query in URL:
: http://lca2-s5-pc04:8080/solr/select?shards=lca2-s5-pc04:8080/solr&q=name:john
: I get  and 0 documents are
: shown.
: 
: when I query in URL:
: 
http://lca2-s5-pc04:8080/solr/select?shards=lca2-s5-pc04:8080/solr,lca2-s5-pc05:8080/solr&q=name:john
:  and again 0 documents are
: shown.
: 
: I'm not able to figure out why it is not able to use SHARDS for querying and
: return documents. Can it be a Solr-config problem??



-Hoss



Re: convert Nutch index to Solr

2009-03-03 Thread Otis Gospodnetic

I don't think there is a way, other than manually reading Nutch's (Hadoop's) 
files and reindexing the content with Solr.  But you should probably be using 
Nutch's support for Solr instead.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
> From: Tony Wang 
> To: solr-user@lucene.apache.org
> Sent: Tuesday, March 3, 2009 8:28:35 PM
> Subject: convert Nutch index to Solr
> 
> Hi,
> 
> I am using Nutch nightly build #736 (version 1.0?) to crawl and index, and I
> would like to use Solr as the indexer. I wonder if there's a way to convert
> Nutch indices to Solr?
> 
> Thanks!
> 
> Tony
> 
> -- 
> Are you RCholic? www.RCholic.com
> 温 良 恭 俭 让 仁 义 礼 智 信



Re: Can find solr jars in WEB-INF/lib directory

2009-03-03 Thread The Flight Captain

Thanks for the DirectSolrConnection tip, that eliminated the need for parsing
the XML as a string, and all that code need to instantiate a container. I am
now Using SolrCore.getSolrCore(). This method is deprecated though, what is
the standard way of instaniating a SoreCore to pass it as a parameter to
DirectSolrConnection?

I managed to solve my problem (NoClassDefFound), above, by reverting to the
1.3 release. 


Erik Hatcher wrote:
> 
> 
> On Mar 3, 2009, at 3:01 AM, The Flight Captain wrote:
>> I am wrapping CoreContainer in my own class (FacetServerImpl), so  
>> that I can
>> override the query(SolrRequest request) method to return an xml  
>> String. This
>> is the best way I found to get an xml response from Solr, without  
>> deploying
>> solr as a service, note that EmbeddedSolrServer returns a NamedList.
> 
> Maybe DirectSolrConnection is a better fit for your use?
> 
>> I have also tried putting apache-solr-core-nightly.jar in the lib  
>> directory
>> under Solr Home.
> 
> Solr doesn't load all classes through SolrResourceLoader, only  
> specific plugin points.
> 
>> How can I make the apache-solr-core-nightly.jar available to
>> ContextLoaderListener during bootstrapping of my Web Application?
> 
> put it in WEB-INF/lib??
> 
>   Erik
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-find-solr-jars-in-WEB-INF-lib-directory-tp22304076p22324083.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Field Boosting with q.alt parameter Query

2009-03-03 Thread dabboo

Hi Eric,

Thanks for all the inputs you have given. They are really helpful. I am able
to achieve the field boosting * wildcard with dismax. For this, I had to
make code changes in DisjunctionMaxQueryParser sub class in SolrPluginUtils
class.

Thanks,
Amit Garg

Erik Hatcher wrote:
> 
> Amit,
> 
> If you use the lucene query parser, you only get a q parameter.  All  
> the other parameters, such as qf and bq, are specific to the dismax  
> query parser.  If you want to use the lucene query parser for wildcard  
> capability, you have to manually build the query across multiple  
> fields and boosts.
> 
> If you use the dismax parser, there is no wildcard query capability.
> 
> These are the limitations of what the query parsers currently built  
> into Solr.
> 
> As for the URL throwing a null pointer exception - please send the  
> relevant details (what URL was it?  What was the complete stack  
> trace?  What version of Solr?)
> 
>   Erik
> 
> On Mar 3, 2009, at 5:21 AM, dabboo wrote:
> 
>>
>> Hi,
>>
>> I tried this url but it threw nullpointer exception. Also, I am having
>> underscores in the field name like ProductUrl_s etc.
>> I also debug the query which gets formed with q.alt, it doesnt  
>> calculate the
>> scores of the documents and hence doesnt support field boosting.
>>
>> Please suggest me as how I can achieve the field boosting with this  
>> q.alt
>> parameter.
>>
>> Thanks,
>> Amit Garg
>>
>>
>>
>> dabboo wrote:
>>>
>>> Hi,
>>>
>>> Is there any way, we can implement field boosting with q.alt  
>>> parameter
>>> query. I would appreciate if somebody can suggest if there is any
>>> workaround for the same.
>>>
>>> Thanks,
>>> Amit Garg
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Field-Boosting-with-q.alt-parameter-Query-tp22304491p22305790.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Field-Boosting-with-q.alt-parameter-Query-tp22304491p22324761.html
Sent from the Solr - User mailing list archive at Nabble.com.



Search with Date field

2009-03-03 Thread dabboo

Hi,

Date search is not happening in solr. I am giving the field name and date
value as the request but it is not returning any value.

Please suggest.

Thanks,
Amit Garg
-- 
View this message in context: 
http://www.nabble.com/Search-with-Date-field-tp22324779p22324779.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Search with Date field

2009-03-03 Thread Solruser

Can you reply with example of solr request?

Amit

On Mar 3, 2009, at 11:08 PM, dabboo  wrote:



Hi,

Date search is not happening in solr. I am giving the field name and  
date

value as the request but it is not returning any value.

Please suggest.

Thanks,
Amit Garg
--
View this message in context: 
http://www.nabble.com/Search-with-Date-field-tp22324779p22324779.html
Sent from the Solr - User mailing list archive at Nabble.com.