Alpha numeric sort problem

2008-02-14 Thread Mahesh Udupa
Hello,

I have following entry in my title list:

Content1
Content2
Content3
Content4
Content5

If I try to Sort it in ascending or descending order, I am getting same
order.

I am using following alphaOnlySort field and text.
Please let me know if I miss anything here.

Thanks in advance for looking into this issue.

-Thanks and Regards,
kmu


 
  








  



 
  







  
  







  





  







  



SolrQuery.add

2008-02-14 Thread matthias walter

Hi,

I'm having problems using SolrQuery.add(String, String).

My Sample code is:
   SolrQuery anotherQuery = new SolrQuery();
   anotherQuery.add("city", cmd.getCity());

I get the following error:
null  java.lang.NullPointerException at 
org.apache.solr.common.util.StrUtils.splitSmart(StrUtils.java:36) at 
org.apache.solr.search.OldLuceneQParser.parse(LuceneQParserPlugin.java:104) 
   at org.apache.solr.search.QParser.getQuery(QParser.java:80) at 
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:66) 
   at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:143) 
   at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:117) 
   at org.apache.solr.core.SolrCore.execute(SolrCore.java:902) at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:280) 
   at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:237) 
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
   at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) 
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) 
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
   at java.lang.Thread.run(Thread.java:619)


request: 
http://localhost.local:8080/solr/select?city=Berlin&wt=xml&version=2.2


If I do it like that:

   SolrQuery query = new SolrQuery();
   query.setQuery("city:" + cmd.getCity() + " AND age:24");

Everything works fine.

It's not a real problem because the second version does the job, but the 
code is quite ugly.


Thanks for your help,

Matthias




Re: Filter Query and query score

2008-02-14 Thread tedonk03

Hi, 

I also have the same problem. My case is similar like this, but the user can
select their preferences. I´ll use climbingrose´s example but add it a
little bit.

Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1; longitude=x2]
Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3; longitude=x4]
Doc3: [Title=Java; Location=Parramatta]
Doc4: [Title=Java; Location=NS, NSW; latitude=x1; longitude=x2]
Doc5: [Title=Java; Location=NS, NSW; latitude=x3; longitude=x4]
Doc6: [Title=Java; Location=Parramatta]

For example the user query is Java and their preferences are Paramatta and
NS, so I would like to boost the documents with location Paramatta or NS.
But still I want to show the result from another location. How do I use it
in bq? Can I use it like this:

 bq=location:Parramatta^1.4 || location:NS^1.4

is that correct? I tried but it seems it didn´t work.

So the final result I want that NS and Paramatta get a little boost to the
top and NOrth Ryde goes to the bottom. Is that possible? Thanx

- Ted -


Mike Klaas wrote:
> 
> On 1-Jan-08, at 11:54 PM, climbingrose wrote:
>>
>> Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1;  
>> longitude=x2]
>> Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3;  
>> longitude=x4]
>> Doc3: [Title=Java; Location=Parramatta]
>>
>> My filter query looks like this:
>>
>> fq= (+latitude[lat1 TO lat2] +longitude[lng1 TO lng2])  
>> location:Parramatta
>> location:NSW
>>
>> Now assuming that my query matches those three documents, I need to  
>> make
>> sure that documents with "Parramatta" in their locations have some  
>> kind of
>> boost to the final score. For example, I'd like to have Doc3 listed  
>> before
>> Doc2 because it has "Parramatta" in location field.
>>
>> Is this possible? Thanks in advance!
> 
> Sure, just also add a boost parameter:
> 
> fq= (+latitude[lat1 TO lat2] +longitude[lng1 TO lng2])  
> location:Parramatta location:NSW
> bq=location:Parramatta^1.4
> 
> -Mike
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Filter-Query-and-query-score-tp14574793p15480679.html
Sent from the Solr - User mailing list archive at Nabble.com.



Facing problem with the FieldType of UniqueField

2008-02-14 Thread Rishabh Joshi
Hi,

Initially, in my schema, I had my uniqueField's field type as "string" and
everything was working fine. But, then the users of my application wanted to
search on the unique field and entered values which were in a different case
than what was indexed. They never got proper results, at times, no results.

I noticed this happened because the field type was "string". I then changed
it to a custom text type and had specified only the whitespace tokenizer and
lowercase filter. It worked. The users were able to search on the
uniqueField irrespective of the case the values were entered in.

But now, another problem has risen. If I update a document, it really does
not update, but it is added as a separate document with the same uniqueField
value and the contents of the old document is merged with the new one.

So, now what I want to achieve is that the users should be able to search on
the uniqueField, irrespective of the case the values are entered in; and on
updation of a document, not to have duplicate documents (documents with the
same uniqueField value) in the index. Can anyone help me in as to how this
can be done?

Regards,
Rishabh


Re: DisMaxHandler and plone advanced searches

2008-02-14 Thread Leonardo Santagada


On 14/02/2008, at 00:58, Mike Klaas wrote:

On 13-Feb-08, at 6:11 PM, Leonardo Santagada wrote:

On 13/02/2008, at 23:03, Mike Klaas wrote:

Try using standardrequesthandler with the dismax query parser.



How can I say to standardrequesthandler to apply each query string  
to a diferent field, and how can I conbine the two on the config  
xml? A little example would be cool.


I don't see how you could pre-configure this in solrconfig.xml: how  
do you specific which querystring gets sent to which field?


Just send the query to stdreq handler as follows:

q=field1: field2:

see http://wiki.apache.org/solr/SolrQuerySyntax



Yes, that is what we are doing now, but  and  use the  
full lucene sintax and not the one from dismax query parser. I would  
like to be able to do a search like the one above but with the dismax  
query parser for  ans . Is that possible in any way?


--
Leonardo Santagada





Re: Alpha numeric sort problem

2008-02-14 Thread Erick Erickson
I admit I know little about SOLR, but wouldn't an AlphaOnlySorter ignore
the digits?

Erick

On Thu, Feb 14, 2008 at 3:51 AM, Mahesh Udupa <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> I have following entry in my title list:
>
> Content1
> Content2
> Content3
> Content4
> Content5
>
> If I try to Sort it in ascending or descending order, I am getting same
> order.
>
> I am using following alphaOnlySort field and text.
> Please let me know if I miss anything here.
>
> Thanks in advance for looking into this issue.
>
> -Thanks and Regards,
> kmu
>
>
>   sortMissingLast="true" omitNorms="true">
>  
>
>
>
>
>
>
>
>pattern="([^a-z])" replacement="" replace="all"
>/>
>  
>
>
>
>  
>  
>
>
>
> splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> catenateWords="1" catenateNumbers="0" catenateAll="1"/>
>
>
>
>  
>  
>
> ignoreCase="true" expand="true"/>
>
> splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> catenateWords="1" catenateNumbers="0" catenateAll="1"/>
>
>
>
>  
>
>
>
>
> positionIncrementGap="100" >
>  
>
> ignoreCase="true" expand="false"/>
>
> generateWordParts="0" generateNumberParts="0" catenateWords="1"
> catenateNumbers="1" catenateAll="0"/>
>
>
>
>  
>
>


Re: Facing problem with the FieldType of UniqueField

2008-02-14 Thread Ryan McKinley



I noticed this happened because the field type was "string". I then changed
it to a custom text type and had specified only the whitespace tokenizer and
lowercase filter. It worked. The users were able to search on the


are there spaces in your unique key?  Try using the KeywordTokenizer -- 
the main concern with the field type for uniqueKey is to make sure it 
only has one token.


ryan


How to search multiphrase or a middle term in a word???

2008-02-14 Thread nithyavembu

Hi All,

   I am facing a problem when search for multiphrases in a word.
   My index data is :
srinivasan,sweetheart,thomasmaster,thomasMaster.(totally 4 words)

   Scenario : 1

   Search data : vasan
   If i search for "vasan", its return nothing. But the result should be
"srinivasan".
   Like that, if i search for "hear", its return nothing. The result should
be "sweetheart".
   The indexing data is correct while indexig.
   
   Scenario : 2

   Search data : Master or master
   if i search for "master" or "Master" (Please note the word cases), its
returning only "thosmasMaster".
   But it has to return both "thomasmaster" and "thomasMaster".
  
   But mainly, i am unable to search a middle term in a word. I have
attached my schema.xml with this mail.
   Please help me out. 
   Thanks in advance.

http://www.nabble.com/file/p15484754/schema.xml schema.xml 

with Regards,
Nithya.



-- 
View this message in context: 
http://www.nabble.com/How-to-search-multiphrase-or-a-middle-term-in-a-wordtp15484754p15484754.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: solr to work for my web application

2008-02-14 Thread Fuad Efendi
It should be easy to configure SOLR Schema, & use SOLRJ client; does not
matter jetty/tomcat etc.; stick with simple SOLRJ java client: access
database, generate SOLR document, update SOLR, execute query, parse
(SOLRJ->SolrDocument), generate content, etc... Much easier, scalable, and
more effective than XSLT (initial version of my website was Cocoon&SAXON
powered; it was ugly...).
www.tokenizer.org

> 
> Hey hi...
> 
> Ya the content is generated dynamically from a database...but 
> all data in
> the xml docs(parameters in it) will have same structure as 
> specified in the
> schema..e.g all will have uniquekey parameter set as "csid".  
> 
> I am adding particular case studies in my database with all 
> information like
> name, address...also tags. Then I want to search those case 
> studies on the
> basis of tags added. I have set up solr for that but I am 
> starting it using
> jetty server. I think I will have to start it thru tomcat itself.
> 
> Any quotes?
> 
> Funtick wrote:
> > 
> > Hi,
> > 
> > As I understood, you need a search for your web application.
> > 
> > - How many pages it has?
> > - Is content generated dynamically from a database (for instance)?
> > 
> > Another problem: after updating solrschema.xml you need 
> > - restart SOLR
> > - reindex SOLR
> > 
> > With changing unique ID in schema... I don't remember, but 
> it should be of
> > specific type. You probably need to reindex SOLR.
> > 
> > If your application generates dynamic content, it would be 
> better to index
> > database directly adding 'URL' field to SOLR schema.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/solr-to-work-for-my-web-application-tp15
450968p15474490.html
Sent from the Solr - User mailing list archive at Nabble.com.





Re: Filter Query and query score

2008-02-14 Thread Mike Klaas

On 14-Feb-08, at 6:51 AM, tedonk03 wrote:



Hi,

I also have the same problem. My case is similar like this, but the  
user can

select their preferences. I´ll use climbingrose´s example but add it a
little bit.

Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1;  
longitude=x2]
Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3;  
longitude=x4]

Doc3: [Title=Java; Location=Parramatta]
Doc4: [Title=Java; Location=NS, NSW; latitude=x1; longitude=x2]
Doc5: [Title=Java; Location=NS, NSW; latitude=x3; longitude=x4]
Doc6: [Title=Java; Location=Parramatta]

For example the user query is Java and their preferences are  
Paramatta and
NS, so I would like to boost the documents with location Paramatta  
or NS.
But still I want to show the result from another location. How do I  
use it

in bq? Can I use it like this:

 bq=location:Parramatta^1.4 || location:NS^1.4


"or" is implied:

bq=location:Parramatta^1.4 location:NS^1.4

alternatively, you can use multiple bq's

bq=location:Parramatta^1.4
bq=location:NS^1.4

see http://wiki.apache.org/solr/SolrQuerySyntax

-Mike



Re: Alpha numeric sort problem

2008-02-14 Thread Mahesh Udupa
Thanks Erick for your quick response.

Even I tried with *text*  Field type. But no use.
As splitOnCaseChange="1", do we have splitOnLetterToNumberChange or
something like that?

Thanks in advance
kmu




On Thu, Feb 14, 2008 at 9:50 PM, Erick Erickson <[EMAIL PROTECTED]>
wrote:

> I admit I know little about SOLR, but wouldn't an AlphaOnlySorter ignore
> the digits?
>
> Erick
>
> On Thu, Feb 14, 2008 at 3:51 AM, Mahesh Udupa <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
> >
> > I have following entry in my title list:
> >
> > Content1
> > Content2
> > Content3
> > Content4
> > Content5
> >
> > If I try to Sort it in ascending or descending order, I am getting same
> > order.
> >
> > I am using following alphaOnlySort field and text.
> > Please let me know if I miss anything here.
> >
> > Thanks in advance for looking into this issue.
> >
> > -Thanks and Regards,
> > kmu
> >
> >
> >   > sortMissingLast="true" omitNorms="true">
> >  
> >
> >
> >
> >
> >
> >
> >
> > >pattern="([^a-z])" replacement="" replace="all"
> >/>
> >  
> >
> >
> >
> >   > positionIncrementGap="100">
> >  
> >
> >
> >
> > > splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> > catenateWords="1" catenateNumbers="0" catenateAll="1"/>
> >
> >
> >
> >  
> >  
> >
> > > ignoreCase="true" expand="true"/>
> >
> > > splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> > catenateWords="1" catenateNumbers="0" catenateAll="1"/>
> >
> >
> >
> >  
> >
> >
> >
> >
> > > positionIncrementGap="100" >
> >  
> >
> > > ignoreCase="true" expand="false"/>
> >
> > > generateWordParts="0" generateNumberParts="0" catenateWords="1"
> > catenateNumbers="1" catenateAll="0"/>
> >
> >
> >
> >  
> >
> >
>
>


Re: Alpha numeric sort problem

2008-02-14 Thread Yonik Seeley
On Thu, Feb 14, 2008 at 10:45 PM, Mahesh Udupa <[EMAIL PROTECTED]> wrote:
>  Even I tried with *text*  Field type. But no use.
>  As splitOnCaseChange="1", do we have splitOnLetterToNumberChange or
>  something like that?

Sorting requires a single token in the field (you want to sort on the
whole value).  Try type "string".

-Yonik


Re: Facing problem with the FieldType of UniqueField

2008-02-14 Thread Rishabh Joshi
Ryan,

Using the KeywordTokenizer does not help. And there are not any spaces in
the unique keys. the keys are alpha numeric. E.g.: AA-23-E1

Regards,
Rishabh

On Thu, Feb 14, 2008 at 10:28 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:

>
> > I noticed this happened because the field type was "string". I then
> changed
> > it to a custom text type and had specified only the whitespace tokenizer
> and
> > lowercase filter. It worked. The users were able to search on the
>
> are there spaces in your unique key?  Try using the KeywordTokenizer --
> the main concern with the field type for uniqueKey is to make sure it
> only has one token.
>
> ryan
>


Re: Facing problem with the FieldType of UniqueField

2008-02-14 Thread Chris Hostetter

Bottomline: it's very hard to get everything right with having a uniqueKey 
field that uses TextField.  if your goal is to let your users do case 
insnsitive or "single word" queries on your uniqueKey field, just just 
copyFiled to clone it into something more search friendly.


-Hoss



Re: SolrJ and Unique Doc ID

2008-02-14 Thread Chris Hostetter

: > How do I generate URLs to retrieve a document against any given Solr
: > instance that I happen to be pointing at without knowing which field is the
: > document id?
: 
: One cool technique, not instead of your change to Luke RH (a needed change
: IMO) but another  way to go about it - we have a DocumentRequestHandler that
: takes a uniqueKey parameter that  would retrieve and return that single
: document without having to specify the field name explicitly.

Erik's idea eliminates the need to know what the "name" of the uniqueKey 
field is when formulating the query to "fetch one", but it doesn't solve 
the crux of grants question: when looking at a list of results (with a 
partial "fl" for example) how can you know which value to use to later 
query on and get back just thta document (with the full "fl" for example)

My point was that while knowing the uniqueKey field solves the problem, 
the person setting up the index may not want clients to know this ... the 
clinet has to have *some* pre-existing knowledge about the structure of 
the index ... grant's Luke patch solves this by letting the client get 
this information from Luke, but in a general case a Solr Admin may not 
want to expose that info to his clients (ie: the customerId vs SSN example 
from my previous mail) ... so a general purpose client should probably 
have a more general way to configure the "what field do i treat as unique" 
info without requirng that the LukeHandler be available.




-Hoss



Re: Highlighting the search results

2008-02-14 Thread Chris Hostetter

: I have created a Index of some xml files (xml's was created from mysql
: database) with solr. In xml's I have one text field. (more than 1000
: characters). Its searches fine, but solr result page is too long. I have
: tried highlight (&hl=on&hl.fl=fname), its shows highlighting results at end
: of xml in new tag, but I want an original result tag highlighted.

the main docset allways shows you the full stored value of any field.  if 
you only want the "fragmented" highlight info, just leave the big field 
out of your "fl".  merging the data from the main result set and the hight 
data is something that can be done fairly easily by the client (or a 
stylesheet, etc) so it is not handled internally in Solr.

(that's one of the guiding principles of Solr features: "do things in the 
server that would be harder or more expensive to do in the client, 
don't do things that the client can do just as cheaply/easily.")


-Hoss



RE: solr to work for my web application

2008-02-14 Thread newBea

My eclipse IDE still gives me suggestion that JNDI is not set properly...How
to set JNDI for solr?

I am using tomcat5.5.23 and added solr.xml with context fragments inside the
tomact5.5/../catalina/localhost. Is it the correct way of doing it? Or do i
need to add context fragment in the server.xml file in conf dir of tomcat?

It is easy to start server using jetty externally, however I want solr to be
up and running through tomcat, is it possible? If yes please tell me the
helpful resources or any suggestions from your side...

Thanks in advance...


Funtick wrote:
> 
> It should be easy to configure SOLR Schema, & use SOLRJ client; does not
> matter jetty/tomcat etc.; stick with simple SOLRJ java client: access
> database, generate SOLR document, update SOLR, execute query, parse
> (SOLRJ->SolrDocument), generate content, etc... Much easier, scalable, and
> more effective than XSLT (initial version of my website was Cocoon&SAXON
> powered; it was ugly...).
> www.tokenizer.org
> 
>> 
>> Hey hi...
>> 
>> Ya the content is generated dynamically from a database...but 
>> all data in
>> the xml docs(parameters in it) will have same structure as 
>> specified in the
>> schema..e.g all will have uniquekey parameter set as "csid".  
>> 
>> I am adding particular case studies in my database with all 
>> information like
>> name, address...also tags. Then I want to search those case 
>> studies on the
>> basis of tags added. I have set up solr for that but I am 
>> starting it using
>> jetty server. I think I will have to start it thru tomcat itself.
>> 
>> Any quotes?
>> 
>> Funtick wrote:
>> > 
>> > Hi,
>> > 
>> > As I understood, you need a search for your web application.
>> > 
>> > - How many pages it has?
>> > - Is content generated dynamically from a database (for instance)?
>> > 
>> > Another problem: after updating solrschema.xml you need 
>> > - restart SOLR
>> > - reindex SOLR
>> > 
>> > With changing unique ID in schema... I don't remember, but 
>> it should be of
>> > specific type. You probably need to reindex SOLR.
>> > 
>> > If your application generates dynamic content, it would be 
>> better to index
>> > database directly adding 'URL' field to SOLR schema.
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context: 
>> http://www.nabble.com/solr-to-work-for-my-web-application-tp15
> 450968p15474490.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solr-to-work-for-my-web-application-tp15450968p15495846.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Highlighting the search results

2008-02-14 Thread Laxmilal Menaria
Ok, Thanks..


On 2/15/08, Chris Hostetter <[EMAIL PROTECTED]> wrote:
>
>
> : I have created a Index of some xml files (xml's was created from mysql
> : database) with solr. In xml's I have one text field. (more than 1000
> : characters). Its searches fine, but solr result page is too long. I have
> : tried highlight (&hl=on&hl.fl=fname), its shows highlighting results at
> end
> : of xml in new tag, but I want an original result tag highlighted.
>
>
> the main docset allways shows you the full stored value of any field.  if
> you only want the "fragmented" highlight info, just leave the big field
> out of your "fl".  merging the data from the main result set and the hight
> data is something that can be done fairly easily by the client (or a
> stylesheet, etc) so it is not handled internally in Solr.
>
> (that's one of the guiding principles of Solr features: "do things in the
> server that would be harder or more expensive to do in the client,
> don't do things that the client can do just as cheaply/easily.")
>
>
> -Hoss
>
>


-- 
Thanks,
Laxmilal menaria

http://www.chambal.com/
http://www.minalyzer.com/
http://www.bucketexplorer.com/


Re: FunctionQuery step function

2008-02-14 Thread Chris Hostetter

: We'd like to restrict older modified documents with a step function, rather

: bf="map(map(modified,0,0,today),0,12monthago,0.2)
: map(map(modified,0,0,today),12monthago,6monthago,0.3)
: map(map(modified,0,0,today),6monthsago,today,1)"
: 
: is this inefficient?

For something like this, i would just use bq instead of bf ... i don't 
know that it's more efficient per se, but i'm guessing it would be, 
and it's certinaly easier to understand (to me anyway)...

bq=modified:[NOW/DAY-6MONTHS TO *]^1 modified:[NOW/DAY-1YEAR TO NOW/DAY-6MONTHS 
TO *]^0.3 modified:[* TO NOW/DAY-1YEAR]^0.3

(the score values may not work out to exactly the same because of hte way 
FUnctionQuery works, but that's just a matter of twiddling the boosts 
untill you get what you want)



-Hoss



Re: solr to work for my web application

2008-02-14 Thread newBea

Hi Thorsten...

SOrry for giving u much trouble but I need some answer regarding solr...plz
help...

Question1
I am using tomcat 5.5.23 so for JNDI setup of solr, adding solr.xml with
context fragment as below in the tomcat5.5/...catalina/localhost.


   


Is it the correct way of doing it? Or do I need to add context fragment in
the server.xml of tomcat5.5?

Question2
I am starting solr server using start.jar from another location on C:
drive...whereas my home location indicated on D: drive. Is it the root coz I
am not getting the search result?

Question3
I have added parameter as C:\solr\data in
solrconfig.xml...but the indexes are not getting stored there...indexes for
search are getting stored in the default dir of solr...any suggestions

Thanks in advance...


Thorsten Scherler wrote:
> 
> On Wed, 2008-02-13 at 05:04 -0800, newBea wrote:
>> I havnt used luke.xsl. Ya but the link provided by u gives me "Solr Luke
>> Request Handler Response"...
>> 
>>  is simple string as: csid
> 
> So you have:
> csid
> 
> and
>  required="true" /> 
> 
> 
>> 
>> till now I am updating docs thru command prompt as : post.jar *.xml
>> http://localhost:8983/update
> 
> how do the docs look like? I mean since you changed the sample config
> you send changed documents as well, right? How do they look?
> 
>> 
>> I am not clear on how do I post xml docs
> 
> Well like you said, with the post.jar and then you will send your
> modified docs but there are many ways to trigger an add command to solr.
> 
>>  or wud xml docs be posted while I
>> request solr thru tomcat at the time of searching text...
> 
> To search text from tomcat you will need to have a servlet or something
> similar that contacts the solr server for the search result and the
> handle the response (e.g. apply custom xsl to the results).
> 
> 
> 
>> 
>> This manually procedure when I update the xml docs on exampledocs folder
>> inside distribution package restrict it to exampledocs itself
> 
> No, either copy the jar to the folder where you have your documents or
> add it to the PATH.
> 
>> ...I am not
>> getting a way where my sites text get searched by solr...Do I need to
>> copy
>> start.jar and relevant folders in my working directory for web
>> application.
> 
> Hmm, it seems that you not have understood the second paragraph of 
> http://wiki.apache.org/solr/mySolr
> 
> "Typically it's not recommended to have your front end users/clients
> hitting Solr directly as part of an HTML form submit ... the more
> conventional way to think of it is that Solr is a backend service, which
> your application can talk to over HTTP ..."
> 
> Meaning you have two different server running. Alternatively you can run
> solr in the same tomcat as you application. If you follow SolrTomcat
> from the wiki it will be install as "solr" servlet. Your application
> will then communicate with this serlvet.
> 
> salu2
> 
>> 
>> any help?
>> 
>> Thorsten Scherler-3 wrote:
>> > 
>> > On Wed, 2008-02-13 at 03:42 -0800, newBea wrote:
>> >> Hi Thorsten,
>> >> 
>> >> I have my application running on 8080 port with tomcat 5.5.23I am
>> >> starting solr on port 8983 with jetty server using command "java -jar
>> >> start.jar".
>> >> 
>> >> Both the server gets started...now any search I make on tomcat
>> >> application
>> >> is interacting with solr very well. The problem is "schema.xml" and
>> >> "solrconfig.xml" in the conf directory are default one. But after
>> adding
>> >> customized schema name parameter and required fields, solr is not
>> working
>> >> as
>> >> required.
>> > 
>> > Can you post the modification you made to both files?
>> > 
>> >> 
>> >> Customized code for parsing the xml generated from solr is working
>> >> fine...but it is unable to find the uniquekey field which we set for
>> all
>> >> the
>> >> documents in the schema documentand thus result is 0 means
>> nothing.
>> >> 
>> > 
>> > Hmm, what is your update command and your unique key?
>> > 
>> > We would need to see this modification to tell you what may be wrong.
>> > 
>> > Did you try http://YOUR_HOST:8983/solr/admin/luke?wt=xslt&tr=luke.xsl
>> > 
>> > What does this gives?
>> > 
>> > salu2
>> > 
>> >> I am not able to find the solution for this one... any suggestions wud
>> be
>> >> appreciated...thanks in advance. 
>> >> 
>> >> Thorsten Scherler-3 wrote:
>> >> > 
>> >> > On Wed, 2008-02-13 at 00:06 -0800, newBea wrote:
>> >> >> hi 
>> >> >> 
>> >> >> I am new to solr/lucene...I have installed solr nightly
>> version..its
>> >> >> working
>> >> >> very fine.
>> >> >> 
>> >> >> But it is working for the exampledocs present in the example folder
>> of
>> >> >> the
>> >> >> nightly version of solr. I need solr to work for my current web
>> >> >> application...I am using tomcat5.5.23 for the
>> >> >> application(Windows)...using
>> >> >> jetty to start solr from outside of the webapps folder.
>> >> >> 
>> >> >> Is there any way to start the jetty using tomcat?
>> >> >> 
>> >> >> Help would be appreciated.