Re: Solr spring application context error

2009-05-08 Thread Raju444us

Paul/Erik,
  
   Thanks for your reply.I have the jar file containing the plugin code and
the applicationContext.xml in solr/home/lib directory.It is instantiating
the plugin code.But it is not loading the application context.xml file from
solr/home/lib dir.But when i copied the jar file containing the
applicationContext.xml file into the solr.war file's WEB-Inf/lib dir and
placed the solr.war file in tomcat's web-apps dir ,it worked.

As Erik said solr may only load the xml from solr.war file?

Please let me know if there is any way to do this by placing the
applicationContext.xml file in solr/home/lib.

Thanks,
Raju

   

Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> a point to keep in mind is that all the plugin code and everything
> else must be put into the solrhome/lib directory.
> 
> where have you placed the file com/mypackage/applicationContext.xml ?
> 
> On Fri, May 8, 2009 at 12:19 AM, Raju444us  wrote:
>>
>> I have configured solr using tomcat.Everything works fine.I overrode
>> QParserPlugin and configured it.The overriden QParserPlugin has a
>> dependency
>> on another project say project1.So I made a jar of the project and copied
>> the jar to the solr/home lib dir.
>>
>> the project1 project is using spring.It has a factory class which loads
>> the
>> beans.Iam using this factory calss in QParserPlugin to get a bean.When I
>> start my tomcat the factory class is loading fine.But the problem is its
>> not
>> loading the beans.And Iam getting exception
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> IOException
>> parsing XML document from class path resource
>> [com/mypackage/applicationContext.xml]; nested exception is
>> java.io.FileNotFoundException: class path resource
>> [com/mypackage/applicationContext.xml] cannot be opened because it does
>> not
>> exist
>>
>> Do I need to do something else?. Can anybody please help me.
>>
>> Thanks,
>> Raju
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Solr-spring-application-context-error-tp23432901p23432901.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Solr-spring-application-context-error-tp23432901p23444847.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: solrcofig.xml - need some info

2009-05-07 Thread Raju444us

This is resolved.I solved this by reading solrPlugins on the solr wiki.

Thanks,
Raju

Raju444us wrote:
> 
> Hi Hoss,
> 
> If i extend SolrQueryParser and override method getFieldQuery for some
> customization.Can I configure my new queryParser somthing like below
> 
>   
> 
>  
>explicit
>
>  
>   
> 
> Do I need to place my new Parser class in solr/home/lib folder?
> Is this the right way to do this.
> 
> Thanks,
> Raju
> 
> 
> 
> 
> hossman wrote:
>> 
>> : I am pretty new to solr. I was wondering what is this "mm" attribute in
>> : requestHandler in solrconfig.xml and how it works. Tried to search wiki
>> : could not find it
>> 
>> Hmmm... yeah wiki search does mid-word matching doesn't it?
>> 
>> the key thng to realize is that the requestHandler you were looking at 
>> when you saw that option was the DisMaxRequestHandler...
>> 
>>  http://wiki.apache.org/solr/DisMaxRequestHandler
>> 
>> 
>> 
>> -Hoss
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solrcofig.xml---need-some-info-tp15341858p23433477.html
Sent from the Solr - User mailing list archive at Nabble.com.



Solr spring application context error

2009-05-07 Thread Raju444us

I have configured solr using tomcat.Everything works fine.I overrode
QParserPlugin and configured it.The overriden QParserPlugin has a dependency
on another project say project1.So I made a jar of the project and copied
the jar to the solr/home lib dir.

the project1 project is using spring.It has a factory class which loads the
beans.Iam using this factory calss in QParserPlugin to get a bean.When I
start my tomcat the factory class is loading fine.But the problem is its not
loading the beans.And Iam getting exception 

org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from class path resource
[com/mypackage/applicationContext.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[com/mypackage/applicationContext.xml] cannot be opened because it does not
exist

Do I need to do something else?. Can anybody please help me.

Thanks,
Raju


-- 
View this message in context: 
http://www.nabble.com/Solr-spring-application-context-error-tp23432901p23432901.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: solrcofig.xml - need some info

2009-05-06 Thread Raju444us

Hi Hoss,

If i extend SolrQueryParser and override method getFieldQuery for some
customization.Can I configure my new queryParser somthing like below

  

 
   explicit
   
 
  

Do I need to place my new Parser class in solr/home/lib folder?
Is this the right way to do this.

Thanks,
Raju




hossman wrote:
> 
> : I am pretty new to solr. I was wondering what is this "mm" attribute in
> : requestHandler in solrconfig.xml and how it works. Tried to search wiki
> : could not find it
> 
> Hmmm... yeah wiki search does mid-word matching doesn't it?
> 
> the key thng to realize is that the requestHandler you were looking at 
> when you saw that option was the DisMaxRequestHandler...
> 
>   http://wiki.apache.org/solr/DisMaxRequestHandler
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solrcofig.xml---need-some-info-tp15341858p23414447.html
Sent from the Solr - User mailing list archive at Nabble.com.



custome query parser.

2009-04-30 Thread Raju444us

How to write a custom query parser?When i get a query from client I have to
parse it and append that field with a charecter for searching on that
field.Can anyone tried this.
Please help me in doing this.How to configure this queryparser in solr.

Thanks,
Raju
-- 
View this message in context: 
http://www.nabble.com/custome-query-parser.-tp23321502p23321502.html
Sent from the Solr - User mailing list archive at Nabble.com.



Facet counts for common terms of the searched field

2009-04-29 Thread Raju444us

I have a requirement. If I search for text field let's say "metal:glass" what
i want is to get the facet counts for all the terms related to "glass" in my
search results.

window(100)  since a window can be glass.
plastic(10)  plastic is a material just like glass
Iron(10)
Paper(15)

Can I use MLT to get this functionality.Please let me know how can I achieve
this.If possible an example query.

Thanks,
Raju
-- 
View this message in context: 
http://www.nabble.com/Facet-counts-for-common-terms-of-the-searched-field-tp23302410p23302410.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Get date facet counts per month

2009-04-24 Thread Raju444us

Thanks, Shalin.That worked.

Shalin Shekhar Mangar wrote:
> 
> On Thu, Apr 23, 2009 at 2:36 AM, Raju444us 
> wrote:
> 
>>
>> In the example on the wiki at gives the facet counts for date per day.How
>> should the query look like to get date facets by month.
>>
>>
>>
>> http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd
>>
>>
>> Here is the sample query for day level facet counts.
>>
>>
>> http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
>>
> 
> You can use facet.date.gap=+1MONTH
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Get-date-facet-counts-per-month-tp23175859p23217893.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Custom score for a id field

2009-04-24 Thread Raju444us

Thanks,Yonik for quick reply. But How can I override the relevancy score with
my fieldScore for that document when I get back the results. If possible an
example code is helpfull.

Note: Iam storing the fieldScore. so that I can retrieve the score.

Thanks,
Raju



Yonik Seeley-2 wrote:
> 
> On Thu, Apr 23, 2009 at 1:19 PM, Raju444us  wrote:
>> I have a requirement.I index a field "id" and a calculated score for that
>> field named "fieldScore".
>>
>> Note:I have many other fields which are also indexed.But only for this id
>> field i want a custom calculated score.
>>
>> So when I search for that id q="id:1234".What I want is in the results if
>> I
>> use result.getScore() i should get the indexed score(fieldName
>> :fieldScore)
>> for the id instead of the default solr score.
> 
> You can sort directly on the fieldScore field (no need to make the
> relevancy score equal to the fieldScore).
> 
> You can also use fieldScore as part or all of the relevancy score
> using function query.
> q={!func}fieldScore
> 
> 
> -Yonik
> http://www.lucidimagination.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Custom-score-for-a-id-field-tp23197465p23217176.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Custom score for a id field

2009-04-24 Thread Raju444us

Before I index this field I classify this field with some other mechanism and
build some score.So When I index this id field i also index score(which is
float) for this field.So when i search for this id field in the results i
need the score i indexed for this field instead of default score for the
document.

If I used QueryElevationComponent how can I get the custom score which I
indexed for this field.

Thanks,
Raju



Shalin Shekhar Mangar wrote:
> 
> On Thu, Apr 23, 2009 at 10:49 PM, Raju444us  wrote:
> 
>>
>> I have a requirement.I index a field "id" and a calculated score for that
>> field named "fieldScore".
>>
>> Note:I have many other fields which are also indexed.But only for this id
>> field i want a custom calculated score.
>>
>> So when I search for that id q="id:1234".What I want is in the results if
>> I
>> use result.getScore() i should get the indexed score(fieldName
>> :fieldScore)
>> for the id instead of the default solr score.
>>
>> Please let me know the solution to do this.
>>
> 
> What is the use-case here?
> 
> Do you just want to fix the position of that document in the results? If
> yes, look at the QueryElevationComponent.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Custom-score-for-a-id-field-tp23197465p23216650.html
Sent from the Solr - User mailing list archive at Nabble.com.



Custom score for a id field

2009-04-23 Thread Raju444us

I have a requirement.I index a field "id" and a calculated score for that
field named "fieldScore".

Note:I have many other fields which are also indexed.But only for this id
field i want a custom calculated score.

So when I search for that id q="id:1234".What I want is in the results if I
use result.getScore() i should get the indexed score(fieldName :fieldScore)
for the id instead of the default solr score.

Please let me know the solution to do this.

Thanks,
Raju


-- 
View this message in context: 
http://www.nabble.com/Custom-score-for-a-id-field-tp23197465p23197465.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Faceted Dates

2009-04-22 Thread Raju444us

In the example on the wiki that gives the facet counts for date per day.How
should the query look like to get date facets by month. 

 http://wiki.apache.org/solr/SimpleFacetParameters


Here is the sample query for day level facet counts. 
http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY

Thanks,
Raju


Bertrand L. Delacretaz wrote:
> 
> On 1/9/07, Ryan McKinley  wrote:
>> ...I would like to use faceted browsing to group documents by year,
>> month, and day.  I can think of a few ways to do this, but I'd like to
>> see what folks think before i start down the wrong track
> 
> Dunno if you've already read it, but I found this page interesting
> when it comes to date queries, it might give you some additional
> ideas:
> 
>   http://wiki.apache.org/jakarta-lucene/LargeScaleDateRangeProcessing
> 
> -Bertrand
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Faceted-Dates-tp8232159p23177254.html
Sent from the Solr - User mailing list archive at Nabble.com.



Get date facet counts per month

2009-04-22 Thread Raju444us

In the example on the wiki at gives the facet counts for date per day.How
should the query look like to get date facets by month.


http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd


Here is the sample query for day level facet counts.

http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
 


thanks,
Raju
-- 
View this message in context: 
http://www.nabble.com/Get-date-facet-counts-per-month-tp23175859p23175859.html
Sent from the Solr - User mailing list archive at Nabble.com.



Get date facet counts per month level

2009-04-22 Thread Raju444us

In the example on the wiki at gives the facet counts for date per day.How
should the query look like to get date facets by month.


http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd


Here is the sample query for day level facet counts.

http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
 


thanks,
Naveen
-- 
View this message in context: 
http://www.nabble.com/Get-date-facet-counts-per-month-level-tp23175841p23175841.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solr Getting values for an id

2009-04-21 Thread Raju444us

The id field and testScore fields are name value pairs for each id i have a
testScore.When I search based on id  how do I know the position.I there any
method  or api in solr which gives me the position.

I have not understand the second part of your reply.Can you please tell me
how I can do with making those fields non multivalued.If possible some
example or code is help ful

Thanks,
Raju


Otis Gospodnetic wrote:
> 
> 
> You'll have to manually pull/parse those out and match them based on their
> positions, I think.  Or make those fields non-multivalued and add
> additional fields instead, if their number is fixed.
> 
>  Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> 
> 
> 
> ----- Original Message 
>> From: Raju444us 
>> To: solr-user@lucene.apache.org
>> Sent: Tuesday, April 21, 2009 5:40:47 PM
>> Subject: Solr Getting values for an id
>> 
>> 
>> i have a problem.
>> I have a requirement.I indexed document something like this.The id and
>> testScore fields are multivalued.
>> My problem is if i search for id=1 this should return the search results
>> with id = 1 and testScore = 90.
>> Is there any way I can do this.
>> 
>> 
>> 
>>   Test Name
>>   1
>>   90
>>   2
>>   92
>>   3
>>   97
>> 
>> 
>> 
>> Thanks,
>> Naveen
>> 
>> 
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Solr-Getting-values-for-an-id-tp23165464p23165464.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Solr-Getting-values-for-an-id-tp23165464p23165694.html
Sent from the Solr - User mailing list archive at Nabble.com.



Solr Getting values for an id

2009-04-21 Thread Raju444us

i have a problem.
I have a requirement.I indexed document something like this.The id and
testScore fields are multivalued.
My problem is if i search for id=1 this should return the search results
with id = 1 and testScore = 90.
Is there any way I can do this.



  Test Name
  1
  90
  2
  92
  3
  97



Thanks,
Naveen


-- 
View this message in context: 
http://www.nabble.com/Solr-Getting-values-for-an-id-tp23165464p23165464.html
Sent from the Solr - User mailing list archive at Nabble.com.