CAS client configuration with MT4-PHP.

2009-10-23 Thread Radha C.
Hi,
 
We have CAS server of spring integrated and it is running in apache. We have
application in MovableType4 - PHP.
Is it possible to configure the MT4 authentication module to redirect to
external CAS server when the application recieves login request? 
It would be helpful if there is any document available for this.
 
Thanks in advance.


RE: XSLT Response for multivalue fields

2009-10-13 Thread Radha C.

 
Hi Brain,

You can try this xpath in your xls template,

xsl:for-each select=a...@name='author']/str
ByLine
  xsl:value-of select=./
/ByLine
/xsl:for-each


Best,
Radha.C

-Original Message-
From: blholmes [mailto:blhol...@sffind.com] 
Sent: Tuesday, October 13, 2009 6:30 AM
To: solr-user@lucene.apache.org
Subject: XSLT Response for multivalue fields


I am having trouble generating the xsl file for multivalue entries. I'm not
sure I'm missing something, or if this is how it is supposed to function. I
have to authors and I'd like to have seperate ByLine notes in my
translation.
Here is what solr returns normally
...
arr name=author
strCrista  Souza/str
strDarrell  Dunn/str
/arr

Here is my xsl
xsl:for-each select=a...@name='author']::*
   ByLine
xsl:value-of select=./
   /ByLine
/xsl:for-each


And here is what it is returning:
ByLineCrista  SouzaDarrell  Dunn/ByLine

I was expecting it to return
ByLineCrista  Souza/ByLine
ByLineDarrell  Dunn/ByLine

I've tried other variations and using templates instead but it keeps
displaying the same thing, one ByLine field with things mushed together.

Any clues if this is an issue with xslt code, the xslt response Writer,
XALAN, or solr? I've no clues where to go from here. Any ideas to point me
in the right direction appreciated.
--
View this message in context:
http://www.nabble.com/XSLT-Response-for-multivalue-fields-tp25865618p2586561
8.html
Sent from the Solr - User mailing list archive at Nabble.com.



wildcard search is not working

2009-08-06 Thread Radha C.
Hi,
 
 
I have documents contain word healthcare articles. I need to match the
healthcare artcles documents 
for the query strings helath, articles... 
 
I tried q=health*, q=helath*, q=heath*articles but everything returns
empty result. When I try q=healthcare artilces ,the search returns proper
documents.
 
Can anyone tell me what is the wrong with my query string?
 


query matching issue

2009-08-05 Thread Radha C.
Hello list,
 
I have documents contains word Richard Nass. I need to match the Richard
Nass documents for the query strings richard, nass, rich.
The search works for the following query ,
 
http://localhost:8983/solr/select?q=author:Richard
http://localhost:8983/solr/select?q=author:Richard nass nass 
http://localhost:8983/solr/select?q=author:Richard
http://localhost:8983/solr/select?q=author:Richard Nass Nass
http://localhost:8983/solr/select?q=author:richard
http://localhost:8983/solr/select?q=author:richard nass nass
 
But doesnot work for q=author:Richard, q=author:nass q=author:rich...
 
I tried wildcard search like q=author:rich* also.
 
Can anyone help me how to get the flexible search as above.
 
Thanks in advance..
 
Radha.C
 


query matching issue

2009-08-05 Thread Radha C.
Hello list,

I have documents contain word Richard Nass. I need to match the Richard
Nass documents for the query strings richard, nass, rich.

The search works for the following queries ,

 http://localhost:8983/solr/select?q=author:Richard nass
http://localhost:8983/solr/select?q=author:Richard nass

 http://localhost:8983/solr/select?q=author:Richard Nass
http://localhost:8983/solr/select?q=author:Richard Nass

 http://localhost:8983/solr/select?q=author:richard nass
http://localhost:8983/solr/select?q=author:richard nass 


But doesnot work for q=author:Richard, q=author:nass q=author:rich 

I tried wildcard search like q=author:rich* also.

Can anyone help me how to get the flexible search as above.

Thanks in advance..

Radha.C



spelling suggestion in solr.

2009-06-30 Thread Radha C.
Hello List,
 
The feature spelling suggestion is available in solr? If yes, can you tell
me some documentations?
 
Thanks,
Radha.C


RE: spelling suggestion in solr.

2009-06-30 Thread Radha C.

 
Thank you for your reply.

-Original Message-
From: Michael Ludwig [mailto:m...@as-guides.com] 
Sent: Tuesday, June 30, 2009 2:48 PM
To: solr-user@lucene.apache.org
Subject: Re: spelling suggestion in solr.

Radha C. schrieb:

 The feature spelling suggestion is available in solr? If yes, can 
 you tell me some documentations?

Have you tried googling for: solr spelling ? First hit:

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

Michael Ludwig



RE: spelling suggestion in solr.

2009-06-30 Thread Radha C.
Thanks,  I did a quick testing with collate parameter, It works !!

  _  

From: Markus Jelsma - Buyways B.V. [mailto:mar...@buyways.nl] 
Sent: Tuesday, June 30, 2009 2:49 PM
To: cra...@ceiindia.com
Cc: solr-user@lucene.apache.org
Subject: Re: spelling suggestion in solr.


Hello,


This is available indeed, check the
http://wiki.apache.org/solr/SpellCheckComponent wiki page for detailed
information. The interesting parameter here is spellcheck.collate=true
which will return something like str name=collationprice:[80 TO 100]
dell ultrasharp/str for the, erronous spelled price:[80 TO 100] hell
ultrashar query. You can also specify the onlyMorePopular=true parameter
which should return zero or more collations that return more documents than
the specified.


Cheers,



-  

Markus Jelsma  Buyways B.V. Tel. 050-3118123

Technisch ArchitectFriesestraatweg 215c Fax. 050-3118124

http://www.buyways.nl  9743 AD GroningenKvK  01074105


On Tue, 2009-06-30 at 14:42 +0530, Radha C. wrote: 

Hello List,

 

The feature spelling suggestion is available in solr? If yes, can you tell

me some documentations?

 

Thanks,

Radha.C



RE: complex OR query not working

2009-06-30 Thread Radha C.

Do you have to remove the documents which satisfies the both conditions? If
so use AND.

you have used OR, so if the first condition is satisfied , it will not
consider the second condition at all.

try using fq for both the condition, fq=(spacegroupID:g*) fq=(!userID:g*).


-Original Message-
From: Ashish P [mailto:ashish.ping...@gmail.com] 
Sent: Tuesday, June 30, 2009 4:10 PM
To: solr-user@lucene.apache.org
Subject: complex OR query not working


I want to execute the following query:
(spacegroupID:g*) OR (!userID:g*).
What I want to do here is select all docs where spacegroupID is starts with
'g' or selects docs where userId not start with 'g'.
In above syntax  (!userID:g*) gives results correctly.
Also (spacegroupID:g*)  gives results correctly.
But after adding OR the results are not correct, they seem to be like from
result of (spacegroupID:g*) remove the results of userID:g*.

Any idea on how to achieve the goal.
Thanks,
Ashish
--
View this message in context:
http://www.nabble.com/complex-OR-query-not-working-tp24269684p24269684.html
Sent from the Solr - User mailing list archive at Nabble.com.



Query parameter encode issue

2009-06-16 Thread Radha C.
Hello list,
 
I am having the following query,
q=+text:test +site_id:(4 ) +publishDate:[2008-05-01T00\:00\:00Z TO
2009-06-30T00\:00\:00Z]
 
If I try this query in the browser directly , it is working fine and the url
is encoded automatically in the browser when I enter as follows
 
http://localhost:8983/solr/TeamSite/select?q=+text:test%20+site_id:(4%20)%20
+publishDate:[2008-05-01T00\:00\:00Z%20TO%202009-06-30T00\:00\:00Z]
 
In my developed solr client, I am using the following code to encode,
 
qryString = +text:test +site_id:(4 ) +publishDate:[2008-05-01T00\:00\:00Z
TO 2009-06-30T00\:00\:00Z];
URLEncoder.encode(qryString, UTF-8);
 
and the encoded url is like this,
 
http://localhost:8983/solr/TeamSite/select?q=%2Btext%3Atest+%2Bsite_id%3A%28
4+%29+%2BpublishDate%3A%5B2008-05-01T00%5C%3A00%5C%3A00Z+TO+2009-06-30T00%5C
%3A00%5C%3A00Z%5D
 
I am just encoding the parameter value ( +text:test +site_id:(4 )
+publishDate:[2008-05-01T00\:00\:00Z TO 2009-06-30T00\:00\:00Z] ) and not
parameter name ( q=).
 
Can anyone please tell me what mistake I have done here?
 


RE: Query parameter encode issue

2009-06-16 Thread Radha C.
 
Thanks for your reply.. 
 
If that is the case, I need to do as follows, 
 
+text: + URLEncoder.encode(test, UTF-8) +URLEncoder.encode( ,
UTF-8)++site_id+URLEncoder.encode(xx, UTF-8) 
 
Do I need to encode the space between two search field also? It is difficult
for me to do like this because I am having many search fields and forming
the query string dynamically. 
 
Is there any other way I can do this? or else I will follow this then.
 
 

 
  _  

From: Avlesh Singh [mailto:avl...@gmail.com] 
Sent: Tuesday, June 16, 2009 8:38 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Query parameter encode issue



qryString = +text:test +site_id:(4 ) +publishDate:[2008-05-01T00\:00\:00Z
TO 2009-06-30T00\:00\:00Z];
URLEncoder.encode(qryString, UTF-8);



You don't have to encode the complete query string parameter. You just need
encode the values for individual query paramters.

So it should be more like qryString = +text: + URLEncoder.encode(test,
UTF-8) ... and so on.

Cheers
Avlesh


On Tue, Jun 16, 2009 at 8:20 PM, Radha C. cra...@ceiindia.com wrote:


Hello list,

I am having the following query,
q=+text:test +site_id:(4 ) +publishDate:[2008-05-01T00\:00\:00Z TO
2009-06-30T00\:00\:00Z]

If I try this query in the browser directly , it is working fine and the url
is encoded automatically in the browser when I enter as follows

http://localhost:8983/solr/TeamSite/select?q=+text:test%20+site_id:(4%20)%20
http://localhost:8983/solr/TeamSite/select?q=+text:test%20+site_id:%284%20%
29%20%0A+publishDate:%5B2008-05-01T00 
+publishDate:[2008-05-01T00\:00\:00Z%20TO%202009-06-30T00\:00\:00Z]

In my developed solr client, I am using the following code to encode,

qryString = +text:test +site_id:(4 ) +publishDate:[2008-05-01T00\:00\:00Z
TO 2009-06-30T00\:00\:00Z];
URLEncoder.encode(qryString, UTF-8);

and the encoded url is like this,

http://localhost:8983/solr/TeamSite/select?q=%2Btext%3Atest+%2Bsite_id%3A%28
http://localhost:8983/solr/TeamSite/select?q=%2Btext%3Atest+%2Bsite_id%3A%2
8%0A4+%29+%2BpublishDate%3A%5B2008-05-01T00%5C%3A00%5C%3A00Z+TO+2009-06-30T0
0%5C%0A%3A00%5C%3A00Z%5D 
4+%29+%2BpublishDate%3A%5B2008-05-01T00%5C%3A00%5C%3A00Z+TO+2009-06-30T00%5C
%3A00%5C%3A00Z%5D

I am just encoding the parameter value ( +text:test +site_id:(4 )
+publishDate:[2008-05-01T00\:00\:00Z TO 2009-06-30T00\:00\:00Z] ) and not
parameter name ( q=).

Can anyone please tell me what mistake I have done here?






RE: Strange behaviour with copyField

2009-06-04 Thread Radha C.

What is the defaultOperator set in your solrconfig.xml? Are you sure that it
matches for au and not author? 

-Original Message-
From: Grant Ingersoll [mailto:gsing...@apache.org] 
Sent: Thursday, June 04, 2009 2:53 AM
To: solr-user@lucene.apache.org
Subject: Re: Strange behaviour with copyField


On Jun 3, 2009, at 5:09 AM, James Grant wrote:

 I've been hitting my head against a wall all morning trying to  
 figure this out and haven't managed to get anywhere and wondered if  
 anybody here can help.

 I have defined a field type

   fieldType name=text_au class=solr.TextField  
 positionIncrementGap=100
 analyzer
   tokenizer class=solr.LowerCaseTokenizerFactory /
 /analyzer
   /fieldType

 I have two fields

 field name=au type=text_au indexed=true stored=true  
 required=false multiValued=true/
 field name=author type=text_au indexed=true stored=false  
 multiValued=true/

I don't see the difference, as they are the same FieldType for each  
field, text_au.  Is this a typo or am I missing something?



 and a copyField line

 copyField source=au dest=author /

 The idea is to allow searching for authors so a search for author: 
 (Hobbs A.U.) will match the au field value Hobbs A. U. (notice  
 the space).

What would lower casing do for handling the space?



 However the query au:(Hobbs A.U.) matches and the the query  
 author:(Hobbs A.U.) does not.

 Any ideas?


How are you indexing?

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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search



Search in all the fields q=(*:test)

2009-05-19 Thread Radha C.
Hello List,

 

I need to search a value in all the fields. I am using q=(*:test) . But it
retrives zero results.

Can anyone tell me the above syntax is correct or not?

 

Thanks in advance.



RE: Search in all the fields q=(*:test)

2009-05-19 Thread Radha C.
Thanks,  you are correct.

 

  _  

From: Andrey Klochkov [mailto:akloch...@griddynamics.com] 
Sent: Tuesday, May 19, 2009 8:00 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Search in all the fields q=(*:test)

 

I suppose that when you use * as field name, Solr search in default search
field as long as Lucene doesn't support searching through several fields as
far as I know. Read here:

http://wiki.apache.org/solr/SchemaXml#head-b80c539a0a01eef8034c3776e49e8fe1c
064f496

On Tue, May 19, 2009 at 5:46 PM, Radha C. cra...@ceiindia.com wrote:

Hello List,



I need to search a value in all the fields. I am using q=(*:test) . But it
retrives zero results.

Can anyone tell me the above syntax is correct or not?



Thanks in advance.




-- 
Andrew Klochkov



RE: irrelevant search results - encode issue.

2009-05-16 Thread Radha C.
Thanks shalin.. that works...

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Saturday, May 16, 2009 11:47 AM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: irrelevant search results - encode issue.


On Fri, May 15, 2009 at 9:16 PM, Radha C. cra...@ceiindia.com wrote:



I found the why it is returning irrelevant documents. I am encoding my query
string with UTF-8 and appending to url as follows so it fails.
This is the query string = art_id:queryTextstart=0rows=10sort=score desc
encoded url :
http://localhost:8983/solr/TeamSite/select?q=art_id%3A183702815%26start%3D0%
http://localhost:8983/solr/TeamSite/select?q=art_id%3A183702815%26start%3D0
%%0A26rows%3D10%26sort%3Dscore+desc 
26rows%3D10%26sort%3Dscore+desc



You do not need to encode the url parameter names themselves. You only need
to encode the parameter values (i.e. after the equals operator). Using UTF-8
encoding is fine.

So the correct url will look like the following:
q=art_id:queryTextstart=0rows=10sort=score desc

-- 
Regards,
Shalin Shekhar Mangar.



irrelevant search results

2009-05-15 Thread Radha C.
Hello List,
 
I am having the below query
 
art_id:queryTextstart=0rows=10sort=score desc and this should not yield
any result because art_id  contains numbers.
 
But when I execute this search , it returns more than 100 documents. the
art_id field is String in schema.xml
 
Can anyone tell me how it works. What is thw wrong in the above query.
 
Thanks,
Radha.C


RE: irrelevant search results - encode issue.

2009-05-15 Thread Radha C.


Hi,

I found the why it is returning irrelevant documents. I am encoding my query
string with UTF-8 and appending to url as follows so it fails.
This is the query string = art_id:queryTextstart=0rows=10sort=score desc
encoded url :
http://localhost:8983/solr/TeamSite/select?q=art_id%3A183702815%26start%3D0%
26rows%3D10%26sort%3Dscore+desc 

If I access the URL directly without encoding and it is working fine. But
this will not work through application. 
I need to encode the url otherwise it will throw Illegal URI exception.

I tried ISO encode. but no luck.

Anybody has any idea. How to resolve this issue. Any help will be
appriciated. Thanks in advance.


Thanks,
Radha.C

-Original Message-
From: Radha C. [mailto:cra...@ceiindia.com] 
Sent: Friday, May 15, 2009 8:57 PM
To: solr-user@lucene.apache.org
Subject: irrelevant search results

Hello List,
 
I am having the below query
 
art_id:queryTextstart=0rows=10sort=score desc and this should not yield
any result because art_id  contains numbers.
 
But when I execute this search , it returns more than 100 documents. the
art_id field is String in schema.xml
 
Can anyone tell me how it works. What is thw wrong in the above query.
 
Thanks,
Radha.C



Query syntax

2009-05-14 Thread Radha C.
Hello List,

 

I need to search the multiple values from the same field. I am having the
following syntax 

I am thinking of the first option. Can anyone tell me which one is correct
syntax? 

 

 Q=+title:=test +site_id:=22 3000676 566644

 Q=+title:=test +site_id:=22 3000676 566644

 Q=+title:=test +site_id:=22 +site_id=:3000676

 

Thanks,

Radha.C

 



RE: Query syntax

2009-05-14 Thread Radha C.
Thanks for your reply. 

 

Yes by mistaken I added := in place of : . The title should match and the
site_id should match any of these 23243455 , 245, 3457676 .

 

 

 

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Thursday, May 14, 2009 5:43 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Query syntax

 

On Thu, May 14, 2009 at 5:20 PM, Radha C. cra...@ceiindia.com wrote:

I need to search the multiple values from the same field. I am having the
following syntax

I am thinking of the first option. Can anyone tell me which one is correct
syntax?

 Q=+title:=test +site_id:=22 3000676 566644

 Q=+title:=test +site_id:=22 3000676 566644

 Q=+title:=test +site_id:=22 +site_id=:3000676




None of the above. That := is not a valid syntax. The request parameter
should be a lower cased q. The + character signifies must occur
similar to a boolean AND.

Should title:test must match? Should all of 22, 3000676 etc be
present in site_id or just one match is alright?
-- 
Regards,
Shalin Shekhar Mangar.



what is the query syntax to search a value in more than one field.

2009-05-06 Thread Radha C.
Hi,
 
I need to search a text value in field A, field B, and field C. Can anybody
tel me how to form the query. 
 
I am thinking of the option like q=A:text AND B:text AND C:text . Is it
correct ?
 
Thanks in advance.


RE: what is the query syntax to search a value in more than one field.

2009-05-06 Thread Radha C.
Thanks much Avlesh .

  _  

From: Avlesh Singh [mailto:avl...@gmail.com] 
Sent: Wednesday, May 06, 2009 5:01 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: what is the query syntax to search a value in more than one
field.


Query for text to be present in all the fields:
q=(+A:text +B:text +C:text)

Query for text to be present in any of the fields:
q=(A:text B:text C:text)

Cheers
Avlesh


On Wed, May 6, 2009 at 4:43 PM, Radha C. cra...@ceiindia.com wrote:


Hi,

I need to search a text value in field A, field B, and field C. Can anybody
tel me how to form the query.

I am thinking of the option like q=A:text AND B:text AND C:text . Is it
correct ?

Thanks in advance.





java version for solr.

2009-04-30 Thread Radha C.
Hello List,
 
Our production server is using j2sdk1.4.2_12 and solr requires Java 1.5 . 
So it is must to use java 1.5 in order to use Solr?.  
Can anyone tel me what issues can be faced if we use java1.4 ?  
So do we need to implement any utility to make use of solr in java 1.4
environment?
 
Thanks in advance.


RE: java version for solr.

2009-04-30 Thread Radha C.

Thanks all. Is there any other way like retroweaver?

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Thursday, April 30, 2009 5:58 PM
To: solr-user@lucene.apache.org
Subject: Re: java version for solr.

Solr uses java.util.concurrent packages which is not available in java1.4.

So it may be impossible to make Solr work in java 1.4

On Thu, Apr 30, 2009 at 5:47 PM, Smiley, David W. dsmi...@mitre.org wrote:
 Solr indeed requires Java 1.5.

 I am not sure if anyone has tried this but you may be able to get it to 
 work after applying Retroweaver:
 http://retroweaver.sourceforge.net/
 However I don't think retroweaver re-targets classes/methods in 1.5 that are 
 not in 1.4.  Not sure.

 ~ David Smiley


 On 4/30/09 8:00 AM, Radha C. cra...@ceiindia.com wrote:

 Hello List,

 Our production server is using j2sdk1.4.2_12 and solr requires Java 1.5 .
 So it is must to use java 1.5 in order to use Solr?.
 Can anyone tel me what issues can be faced if we use java1.4 ?
 So do we need to implement any utility to make use of solr in java 1.4 
 environment?

 Thanks in advance.





--
--Noble Paul



How to copy the Dynamic fields into one field

2009-04-06 Thread Radha C.
Hi,
 
Can I have the dynamic field in copyField as follows,
 
dynamicField name=*_i  type=integerindexed=true  stored=true/
 dynamicField name=*_txt  type=textindexed=true  stored=true/
 
copyField source=*_i dest=all/
 copyField source=*_txt dest=all/
 
Can anyone tell me please how to make the dynamic field to be available in
one field all ?
 


RE: Error in Importing from Oracle

2009-04-03 Thread Radha C.

Thanks guys,

I used pure java driver. That works. 

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Friday, April 03, 2009 8:59 AM
To: solr-user@lucene.apache.org
Subject: Re: Error in Importing from Oracle

put your native dll/iso file in the LD_LIBRARY_PATH and start Solr with that. 
Or the  best solution is to use a pure java driver

On Thu, Apr 2, 2009 at 8:13 PM, Shalin Shekhar Mangar shalinman...@gmail.com 
wrote:
 On Thu, Apr 2, 2009 at 6:57 PM, Radha C. cra...@ceiindia.com wrote:
 Hello List,

 I am trying to do full import from remote oracle server. I am getting 
 the below error,

 Can anyone please help me what configuration I am missing?  Thanks in 
 advance.

 Apr 2, 2009 6:46:39 PM 
 org.apache.solr.handler.dataimport.DataImporter
 doFullImport
 SEVERE: Full Import failed
 org.apache.solr.handler.dataimport.DataImportHandlerException:
 java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path


 It looks like your Oracle jdbc driver depends on some native code 
 libraries which are missing in your environment. I suggest that you 
 look in the documentation of the jdbc driver. However, I'm quite 
 certain that there exists a pure java jdbc driver for Oracle too.

 --
 Regards,
 Shalin Shekhar Mangar.




--
--Noble Paul



Error in Importing from Oracle

2009-04-02 Thread Radha C.
Hello List,
 
I am trying to do full import from remote oracle server. I am getting the
below error, 
 
Can anyone please help me what configuration I am missing?  Thanks in
advance.
 
Apr 2, 2009 6:46:39 PM org.apache.solr.handler.dataimport.DataImporter
doFullImport
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException:
java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:
402)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225
)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:323)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:381
)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:362)
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3135)
at java.security.AccessController.doPrivileged(Native Method)
at
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3131)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
at
oracle.jdbc.driver.PhysicalConnection.init(PhysicalConnection.java:414)
at oracle.jdbc.driver.T2CConnection.init(T2CConnection.java:132)
at
oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:
78)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java
:126)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java
:119)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSour
ce.java:325)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.
java:37)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.init(J
dbcDataSource.java:201)
 



Runtime exception when adding documents using solrj

2009-04-01 Thread Radha C.
Hi All,
 
I am trying to index documents by using solrj client. I have written a
simple code below,
 
{
CommonsHttpSolrServer server =   new
CommonsHttpSolrServer(http://localhost:8080/solr/update;);
SolrInputDocument doc1=new SolrInputDocument();
doc1.addField( id, id1, 1.0f );
doc1.addField( name, doc1, 1.0f );
doc1.addField( price, 10 );
SolrInputDocument doc2 = new SolrInputDocument();
doc2.addField( id, id2, 1.0f );
doc2.addField( name, doc2, 1.0f );
doc2.addField( price, 20 );
CollectionSolrInputDocument docs = new
ArrayListSolrInputDocument();
docs.add( doc1 );
docs.add( doc2 );
server.add(docs);
server.commit();
}
 
But I am getting the below error, Can anyone tell me what is the wrong with
the above code.
 
Exception in thread main java.lang.RuntimeException: Invalid version or
the data in not in 'javabin' format
at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:98)
at
org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(Binar
yResponseParser.java:39)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:470)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:245)
at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.jav
a:243)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
at SolrIndexTest.main(SolrIndexTest.java:46)
Java Result: 1



RE: Runtime exception when adding documents using solrj

2009-04-01 Thread Radha C.
 
I am using Solr 1.3 version

  _  

From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Wednesday, April 01, 2009 12:16 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Runtime exception when adding documents using solrj


which version of Solr are you using? 


On Wed, Apr 1, 2009 at 12:01 PM, Radha C. cra...@ceiindia.com wrote:


Hi All,

I am trying to index documents by using solrj client. I have written a
simple code below,

{
   CommonsHttpSolrServer server =   new
CommonsHttpSolrServer(http://localhost:8080/solr/update;);
   SolrInputDocument doc1=new SolrInputDocument();
   doc1.addField( id, id1, 1.0f );
   doc1.addField( name, doc1, 1.0f );
   doc1.addField( price, 10 );
   SolrInputDocument doc2 = new SolrInputDocument();
   doc2.addField( id, id2, 1.0f );
   doc2.addField( name, doc2, 1.0f );
   doc2.addField( price, 20 );
   CollectionSolrInputDocument docs = new
ArrayListSolrInputDocument();
   docs.add( doc1 );
   docs.add( doc2 );
   server.add(docs);
   server.commit();
}

But I am getting the below error, Can anyone tell me what is the wrong with
the above code.

Exception in thread main java.lang.RuntimeException: Invalid version or
the data in not in 'javabin' format
   at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:98)
   at
org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(Binar
yResponseParser.java:39)
   at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:470)
   at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:245)
   at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.jav
a:243)
   at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
   at SolrIndexTest.main(SolrIndexTest.java:46)
Java Result: 1






-- 
--Noble Paul



RE: Runtime exception when adding documents using solrj

2009-04-01 Thread Radha C.

Can anyone please tell me , what is the issue with the below java code.. 

-Original Message-
From: Radha C. [mailto:cra...@ceiindia.com] 
Sent: Wednesday, April 01, 2009 12:28 PM
To: solr-user@lucene.apache.org
Subject: RE: Runtime exception when adding documents using solrj

 
I am using Solr 1.3 version

  _  

From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com]
Sent: Wednesday, April 01, 2009 12:16 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Runtime exception when adding documents using solrj


which version of Solr are you using? 


On Wed, Apr 1, 2009 at 12:01 PM, Radha C. cra...@ceiindia.com wrote:


Hi All,

I am trying to index documents by using solrj client. I have written a
simple code below,

{
   CommonsHttpSolrServer server =   new
CommonsHttpSolrServer(http://localhost:8080/solr/update;);
   SolrInputDocument doc1=new SolrInputDocument();
   doc1.addField( id, id1, 1.0f );
   doc1.addField( name, doc1, 1.0f );
   doc1.addField( price, 10 );
   SolrInputDocument doc2 = new SolrInputDocument();
   doc2.addField( id, id2, 1.0f );
   doc2.addField( name, doc2, 1.0f );
   doc2.addField( price, 20 );
   CollectionSolrInputDocument docs = new
ArrayListSolrInputDocument();
   docs.add( doc1 );
   docs.add( doc2 );
   server.add(docs);
   server.commit();
}

But I am getting the below error, Can anyone tell me what is the wrong with
the above code.

Exception in thread main java.lang.RuntimeException: Invalid version or
the data in not in 'javabin' format
   at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:98)
   at
org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(Binar
yResponseParser.java:39)
   at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:470)
   at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:245)
   at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.jav
a:243)
   at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
   at SolrIndexTest.main(SolrIndexTest.java:46)
Java Result: 1






-- 
--Noble Paul




RE: Runtime exception when adding documents using solrj

2009-04-01 Thread Radha C.

Thanks Paul,

I changed the URL but I am getting another error - Bad request , Any help will 
be appriciated.

Exception in thread main org.apache.solr.common.SolrException: Bad Request
Bad Request
request: http://localhost:8080/solr/update?wt=javabin
at 
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:428)
at 
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:245)
at 
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:243)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
at SolrIndexTest.main(SolrIndexTest.java:47)
Java Result: 1 




-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Wednesday, April 01, 2009 2:26 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Runtime exception when adding documents using solrj

the url is wrong
try this
CommonsHttpSolrServer server =   new
CommonsHttpSolrServer(http://localhost:8080/solr/;);

On Wed, Apr 1, 2009 at 2:04 PM, Radha C. cra...@ceiindia.com wrote:

 Can anyone please tell me , what is the issue with the below java code..

 -Original Message-
 From: Radha C. [mailto:cra...@ceiindia.com]
 Sent: Wednesday, April 01, 2009 12:28 PM
 To: solr-user@lucene.apache.org
 Subject: RE: Runtime exception when adding documents using solrj


 I am using Solr 1.3 version

  _

 From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com]
 Sent: Wednesday, April 01, 2009 12:16 PM
 To: solr-user@lucene.apache.org; cra...@ceiindia.com
 Subject: Re: Runtime exception when adding documents using solrj


 which version of Solr are you using?


 On Wed, Apr 1, 2009 at 12:01 PM, Radha C. cra...@ceiindia.com wrote:


 Hi All,

 I am trying to index documents by using solrj client. I have written a 
 simple code below,

 {
   CommonsHttpSolrServer server =   new 
 CommonsHttpSolrServer(http://localhost:8080/solr/update;);
   SolrInputDocument doc1=new SolrInputDocument();
   doc1.addField( id, id1, 1.0f );
   doc1.addField( name, doc1, 1.0f );
   doc1.addField( price, 10 );
   SolrInputDocument doc2 = new SolrInputDocument();
   doc2.addField( id, id2, 1.0f );
   doc2.addField( name, doc2, 1.0f );
   doc2.addField( price, 20 );
   CollectionSolrInputDocument docs = new 
 ArrayListSolrInputDocument();
   docs.add( doc1 );
   docs.add( doc2 );
   server.add(docs);
   server.commit();
 }

 But I am getting the below error, Can anyone tell me what is the wrong 
 with the above code.

 Exception in thread main java.lang.RuntimeException: Invalid version 
 or the data in not in 'javabin' format
   at
 org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:9
 8)
   at
 org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse
 (Binar
 yResponseParser.java:39)
   at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpS
 olrServer.java:470)
   at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpS
 olrServer.java:245)
   at
 org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateReque
 st.jav
 a:243)
   at 
 org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
   at SolrIndexTest.main(SolrIndexTest.java:46)
 Java Result: 1






 --
 --Noble Paul





--
--Noble Paul



RE: Runtime exception when adding documents using solrj

2009-04-01 Thread Radha C.

Thanks Paul, I resolved it, I missed one field declaration in schema.xml. Now I 
added, and it works.

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Wednesday, April 01, 2009 3:52 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Runtime exception when adding documents using solrj

Can u take a look at the Solr logs and see what is hapening?

On Wed, Apr 1, 2009 at 3:19 PM, Radha C. cra...@ceiindia.com wrote:

 Thanks Paul,

 I changed the URL but I am getting another error - Bad request , Any help 
 will be appriciated.

 Exception in thread main org.apache.solr.common.SolrException: Bad 
 Request Bad Request
 request: http://localhost:8080/solr/update?wt=javabin
at 
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpSolrServer.java:428)
at 
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpSolrServer.java:245)
at 
 org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateReque
 st.java:243)
at 
 org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
at SolrIndexTest.main(SolrIndexTest.java:47)
 Java Result: 1




 -Original Message-
 From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com]
 Sent: Wednesday, April 01, 2009 2:26 PM
 To: solr-user@lucene.apache.org; cra...@ceiindia.com
 Subject: Re: Runtime exception when adding documents using solrj

 the url is wrong
 try this
 CommonsHttpSolrServer server =   new
 CommonsHttpSolrServer(http://localhost:8080/solr/;);

 On Wed, Apr 1, 2009 at 2:04 PM, Radha C. cra...@ceiindia.com wrote:

 Can anyone please tell me , what is the issue with the below java code..

 -Original Message-
 From: Radha C. [mailto:cra...@ceiindia.com]
 Sent: Wednesday, April 01, 2009 12:28 PM
 To: solr-user@lucene.apache.org
 Subject: RE: Runtime exception when adding documents using solrj


 I am using Solr 1.3 version

  _

 From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com]
 Sent: Wednesday, April 01, 2009 12:16 PM
 To: solr-user@lucene.apache.org; cra...@ceiindia.com
 Subject: Re: Runtime exception when adding documents using solrj


 which version of Solr are you using?


 On Wed, Apr 1, 2009 at 12:01 PM, Radha C. cra...@ceiindia.com wrote:


 Hi All,

 I am trying to index documents by using solrj client. I have written 
 a simple code below,

 {
   CommonsHttpSolrServer server =   new 
 CommonsHttpSolrServer(http://localhost:8080/solr/update;);
   SolrInputDocument doc1=new SolrInputDocument();
   doc1.addField( id, id1, 1.0f );
   doc1.addField( name, doc1, 1.0f );
   doc1.addField( price, 10 );
   SolrInputDocument doc2 = new SolrInputDocument();
   doc2.addField( id, id2, 1.0f );
   doc2.addField( name, doc2, 1.0f );
   doc2.addField( price, 20 );
   CollectionSolrInputDocument docs = new 
 ArrayListSolrInputDocument();
   docs.add( doc1 );
   docs.add( doc2 );
   server.add(docs);
   server.commit();
 }

 But I am getting the below error, Can anyone tell me what is the 
 wrong with the above code.

 Exception in thread main java.lang.RuntimeException: Invalid 
 version or the data in not in 'javabin' format
   at
 org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:
 9
 8)
   at
 org.apache.solr.client.solrj.impl.BinaryResponseParser.processRespons
 e
 (Binar
 yResponseParser.java:39)
   at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Commo
 n
 sHttpS
 olrServer.java:470)
   at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Commo
 n
 sHttpS
 olrServer.java:245)
   at
 org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequ
 e
 st.jav
 a:243)
   at
 org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
   at SolrIndexTest.main(SolrIndexTest.java:46)
 Java Result: 1






 --
 --Noble Paul





 --
 --Noble Paul





--
--Noble Paul



Indexing fields of xml file using solrj

2009-04-01 Thread Radha C.
Hi All,
 
I want to index the document fields in a xml file to index using solrj. I
know how to index the document fields using doc.addfield(). But I dont know
how to post the xml document instead of adding each field in solrj. 
 
Can I index xml file using solrj? Can anyone help me in how to do this? 
 
Thanks,


RE: Indexing fields of xml file using solrj

2009-04-01 Thread Radha C.
Thanks shalin,

I need to index the xml which is in solr's format only. I want to index that
xnl directly using solrj same like how we post using curl. Is there any API
class is available for that?

Can you please provide me any reference link?

-Original Message-
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Wednesday, April 01, 2009 6:07 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj

On Wed, Apr 1, 2009 at 5:17 PM, Radha C. cra...@ceiindia.com wrote:
 Hi All,

 I want to index the document fields in a xml file to index using 
 solrj. I know how to index the document fields using doc.addfield(). 
 But I dont know how to post the xml document instead of adding each field
in solrj.

 Can I index xml file using solrj? Can anyone help me in how to do this?


Solr will only accept xml files which are in the solr's update xml format.
You cannot post any arbitrary xml (you can convert using the xslt). You can
also parse it yourself and use solrj for adding the document. There's
DataImportHandler too which can parse XML using xpath.

--
Regards,
Shalin Shekhar Mangar.



RE: Indexing fields of xml file using solrj

2009-04-01 Thread Radha C.
Hey No,
 
Actually I did not look at your response email. But I saw your email after I
responded to shalin and you gave me a correct answer. Thanks a lot.
So I started coding it also, I thought to reply to u once I executed
successfully. Here is my code,
DirectXmlRequest xmlreq = new DirectXmlRequest( /update, xml.toString() );

server.request( xmlreq );

server.commit();
But I am having trouble in identifying the xml location, 
I am having the input xml in $solrhome/inputdata/example.xml, Do you have
any idea about how to get solrhome 
location dynamically by using any solrj API class?
 

  _  

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com] 
Sent: Wednesday, April 01, 2009 7:30 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj


I understand Shalin is a guru and I am nobody but...
 
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/request/Direc
tXmlRequest.html
 
Is what you need if you want to use Solrj...
 
:-)

 
On 4/1/09, Radha C. cra...@ceiindia.com wrote: 

Thanks shalin,

I need to index the xml which is in solr's format only. I want to index that
xnl directly using solrj same like how we post using curl. Is there any API
class is available for that?

Can you please provide me any reference link?

-Original Message-
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com]
Sent: Wednesday, April 01, 2009 6:07 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj

On Wed, Apr 1, 2009 at 5:17 PM, Radha C. cra...@ceiindia.com wrote:
 Hi All,

 I want to index the document fields in a xml file to index using
 solrj. I know how to index the document fields using doc.addfield().
 But I dont know how to post the xml document instead of adding each field
in solrj.

 Can I index xml file using solrj? Can anyone help me in how to do this?


Solr will only accept xml files which are in the solr's update xml format.
You cannot post any arbitrary xml (you can convert using the xslt). You can
also parse it yourself and use solrj for adding the document. There's
DataImportHandler too which can parse XML using xpath.

--
Regards,
Shalin Shekhar Mangar.






RE: getting solr home path dynamically

2009-04-01 Thread Radha C.
Hi,
 
No luck, I tried as follows, my solr home is there out of of my solrj
client. I think it is looking for the config at CWD,
 
config = new SolrConfig();
   String dir= config.getResourceLoader().getDataDir(); ( I used
getInstanceDir() also )
//File f = new File( home, solr.xml );
System.out.println(solr home : +dir);
 
But got an exception 
 
Apr 1, 2009 8:20:41 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: JNDI not configured for solr (NoInitialContextEx)
Apr 1, 2009 8:20:41 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Apr 1, 2009 8:20:41 PM org.apache.solr.core.SolrResourceLoader init
INFO: Solr home set to 'solr/'
Apr 1, 2009 8:20:41 PM org.apache.solr.core.SolrResourceLoader
createClassLoader
INFO: Reusing parent classloader
Exception in thread main java.lang.RuntimeException: Can't find resource
'solrconfig.xml' in classpath or 'solr/conf/', cwd=D:\Lucene\solrjclient
at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java
:197)
at
org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:1
65)
at org.apache.solr.core.Config.init(Config.java:101)
at org.apache.solr.core.SolrConfig.init(SolrConfig.java:111)
at org.apache.solr.core.SolrConfig.init(SolrConfig.java:68)
at SolrDeleteTest.main(SolrDeleteTest.java:30)
Java Result: 1
 
 
Anybody have any idea ??


  _  

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com] 
Sent: Wednesday, April 01, 2009 8:19 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj


Hello,
 
you can try with:
 
SolrConfig.config.getResourceLoader().getInstanceDir()
 
Let me know if it works.
 
Cheers,
Giovanni

 
On 4/1/09, Radha C. cra...@ceiindia.com wrote: 

Hey No,

Actually I did not look at your response email. But I saw your email after I
responded to shalin and you gave me a correct answer. Thanks a lot.
So I started coding it also, I thought to reply to u once I executed
successfully. Here is my code,
DirectXmlRequest xmlreq = new DirectXmlRequest( /update, xml.toString() );

server.request( xmlreq );

server.commit();
But I am having trouble in identifying the xml location,
I am having the input xml in $solrhome/inputdata/example.xml, Do you have
any idea about how to get solrhome
location dynamically by using any solrj API class?


_

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com]
Sent: Wednesday, April 01, 2009 7:30 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj


I understand Shalin is a guru and I am nobody but...

http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/request/Direc
tXmlRequest.html

Is what you need if you want to use Solrj...

:-)


On 4/1/09, Radha C. cra...@ceiindia.com wrote:

Thanks shalin,

I need to index the xml which is in solr's format only. I want to index that
xnl directly using solrj same like how we post using curl. Is there any API
class is available for that?

Can you please provide me any reference link?

-Original Message-
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com]
Sent: Wednesday, April 01, 2009 6:07 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Indexing fields of xml file using solrj

On Wed, Apr 1, 2009 at 5:17 PM, Radha C. cra...@ceiindia.com wrote:
 Hi All,

 I want to index the document fields in a xml file to index using
 solrj. I know how to index the document fields using doc.addfield().
 But I dont know how to post the xml document instead of adding each field
in solrj.

 Can I index xml file using solrj? Can anyone help me in how to do this?


Solr will only accept xml files which are in the solr's update xml format.
You cannot post any arbitrary xml (you can convert using the xslt). You can
also parse it yourself and use solrj for adding the document. There's
DataImportHandler too which can parse XML using xpath.

--
Regards,
Shalin Shekhar Mangar.









RE: Not getting the proper result.

2009-03-31 Thread Radha C.

Thanks Grant,

I used the analysis page in the example, the StandardTokenizerFactory does
not split by dots, It is passing the L.I.C 
as it is to solr.StandardFilterFactory and this Filter class also did not
split or remove the dots. My question is I read in the wiki page (
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters ) that the
StandardFilterFactory class removes dots and provides LIC  . But it is not
working as mentioned in wiki page. Am I missing anything here? Please
suggest me What went wrong with my below schema.xml.
 

-Original Message-
From: Grant Ingersoll [mailto:gsing...@apache.org] 
Sent: Monday, March 30, 2009 7:46 PM
To: solr-user@lucene.apache.org
Subject: Re: Not getting the proper result. 

The StandardTokenizer splits on punctuation, so L.I.C. is likely becoming
'l', 'i', 'c', while LIC - lic.  One helpful tool is the Analysis page on
the Solr admin:  http://localhost:8983/solr/admin/analysis.jsp
  as it can help you figure out what is going on with analysis on both the
query and indexing side.

HTH,
Grant

On Mar 30, 2009, at 7:50 AM, Radha C. wrote:

 Hi,

 I am having following analyzer set up in schema.xml fieldType 
 name=text class=solr.TextField
 positionIncrementGap=100
 analyzer
  tokenizer class=solr.StandardTokenizerFactory/
  filter class=solr.StandardFilterFactory/
  filter class=solr.LowerCaseFilterFactory/
 /analyzer
  /fieldType

 I am indexing a database field which contains L.I.C and I am trying to 
 search the field as follows but getting zero response.
 http://localhost:8080/solr/select/?q=LIC
 http://localhost:8080/solr/select/?q=LICdebugQuery=on
 debugQuery=on and
 http://localhost:8080/solr/select/?q=lic
 http://localhost:8080/solr/select/?q=licdebugQuery=on
 debugQuery=on

 But it is giving result for  q=L.I.C

 It is not identifying the L.I.C and lic .  what is the wrong here? can 
 anyone help me ?

 Thanks



RE: Not getting the proper result.

2009-03-31 Thread Radha C.

Thanks for your reply. Yes, I restarted the servlet container, and run my
java code to reindex again, I tested with analysis page also.
StandardFilterFactory is not removing dots in the L.I.C. Below is the
analyser output. Sohould I use WhiteSpaceTokenizerFactory with the
StandardFilterFactory ? 

The index Analyzer
-
org.apache.solr.analysis.StandardTokenizerFactory {}
term position   1
term text   L.I.C
term type   HOST
source start,end0,5
payload 
org.apache.solr.analysis.StandardFilterFactory {}
term position   1
term text   L.I.C
term type   HOST
source start,end0,5
payload 
org.apache.solr.analysis.LowerCaseFilterFactory {}
term position   1
term text   l.i.c
term type   HOST
source start,end0,5
payload  

-Original Message-
From: dabboo [mailto:ag...@sapient.com] 
Sent: Tuesday, March 31, 2009 1:50 PM
To: solr-user@lucene.apache.org
Subject: RE: Not getting the proper result.


Did you try creating your indexes again after modifying the schema.xml

The way Solr search is, whatever string you have 

Radha C. wrote:
 
 
 Thanks Grant,
 
 I used the analysis page in the example, the StandardTokenizerFactory 
 does not split by dots, It is passing the L.I.C as it is to 
 solr.StandardFilterFactory and this Filter class also did not split or 
 remove the dots. My question is I read in the wiki page ( 
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters ) that the 
 StandardFilterFactory class removes dots and provides LIC  . But it is 
 not working as mentioned in wiki page. Am I missing anything here? 
 Please suggest me What went wrong with my below schema.xml.
  
 
 -Original Message-
 From: Grant Ingersoll [mailto:gsing...@apache.org]
 Sent: Monday, March 30, 2009 7:46 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Not getting the proper result. 
 
 The StandardTokenizer splits on punctuation, so L.I.C. is likely 
 becoming 'l', 'i', 'c', while LIC - lic.  One helpful tool is the 
 Analysis page on the Solr admin:
http://localhost:8983/solr/admin/analysis.jsp
   as it can help you figure out what is going on with analysis on both 
 the query and indexing side.
 
 HTH,
 Grant
 
 On Mar 30, 2009, at 7:50 AM, Radha C. wrote:
 
 Hi,

 I am having following analyzer set up in schema.xml fieldType 
 name=text class=solr.TextField
 positionIncrementGap=100
 analyzer
  tokenizer class=solr.StandardTokenizerFactory/
  filter class=solr.StandardFilterFactory/
  filter class=solr.LowerCaseFilterFactory/
 /analyzer
  /fieldType

 I am indexing a database field which contains L.I.C and I am trying 
 to search the field as follows but getting zero response.
 http://localhost:8080/solr/select/?q=LIC
 http://localhost:8080/solr/select/?q=LICdebugQuery=on
 debugQuery=on and
 http://localhost:8080/solr/select/?q=lic
 http://localhost:8080/solr/select/?q=licdebugQuery=on
 debugQuery=on

 But it is giving result for  q=L.I.C

 It is not identifying the L.I.C and lic .  what is the wrong here? 
 can anyone help me ?

 Thanks
 
 
 

--
View this message in context:
http://www.nabble.com/Not-getting-the-proper-result.-tp22781710p22800476.htm
l
Sent from the Solr - User mailing list archive at Nabble.com.



indexed fields vs stored fields

2009-03-31 Thread Radha C.
Hello List,
 
I know about indexing fields but little unclear about the difference between
index field and stored field. 
Can anyone explain me whta does mean by index and stored fields? and What
does mean by storing large fields outside of Solr (need to set store=false
in schema.xml ) ?
 
Thanks in advance.
 


RE: Increase the number of results in the example jetty server app

2009-03-31 Thread Radha C.

you can control the number of response documents from the query url
q=teststart=0rows=20
And refer to the documentation provided in
http://lucene.apache.org/solr/tutorial.html#Getting+Started for any example
demo related questions.

-Original Message-
From: Sajith Weerakoon [mailto:saji...@zone24x7.com] 
Sent: Tuesday, March 31, 2009 3:52 PM
To: solr-user@lucene.apache.org
Subject: Increase the number of results in the example jetty server app

Hello all,

 

I want to increase the number of results shown in the example jetty app for
more thn 10. Can some1 tell me how to configure the configuration file so
that we can get more results than this.

 

Thanks,

Regards,

Sajith Vimukthi Weerakoon.

 




RE: indexed fields vs stored fields

2009-03-31 Thread Radha C.
 
Thanks Paul,

So I set stored=false to a field in schema.xml, and I tried to search that 
field value. It is identified properly and getting the number of response with 
empty document values. This is how it works. But What if I want that field 
value which is not stored in solr? 

Suppose If I have an large field and I am not storing the field in solr due to 
performance factor, How can I handle this field or How can I get the value of 
the field through search ? How to store large fields outside of Solr?
  
-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Tuesday, March 31, 2009 5:41 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: indexed fields vs stored fields

indexed  = can be searched (mean you can use this to query). This undergoes 
tokenization filter etc stored = can be retrieved . No modification to the 
data. This is stored verbatim

On Tue, Mar 31, 2009 at 4:39 PM, Radha C. cra...@ceiindia.com wrote:
 Hello List,

 I know about indexing fields but little unclear about the difference 
 between index field and stored field.
 Can anyone explain me whta does mean by index and stored fields? and 
 What does mean by storing large fields outside of Solr (need to set 
 store=false
 in schema.xml ) ?

 Thanks in advance.





--
--Noble Paul



Transformers in dataconfig xml

2009-03-31 Thread Radha C.
Hi,
 
Is there any documentation available for usage of transformers in
dataimport. If so can anyone tell me the url ?
 
Thanks


RE: indexed fields vs stored fields

2009-03-31 Thread Radha C.
Thanks, We have tons of records with CLOB fields.

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Tuesday, March 31, 2009 8:21 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: indexed fields vs stored fields


On Tue, Mar 31, 2009 at 5:52 PM, Radha C. cra...@ceiindia.com wrote:



Suppose If I have an large field and I am not storing the field in solr due
to performance factor, How can I handle this field or How can I get the
value of the field through search ? How to store large fields outside of
Solr?


You'd probably need to store, fetch and associate an external field
yourself. So if you are storing your large field in a database, you can
store the primary key in the solr document and fetch/display that field from
the database yourself.

How big are your fields? Are you noticing a slowdown? Can compressed fields
help? Also note that by default solr returns all the stored fields. But you
can specify the fl parameter yourself to limit what gets returned.


-- 
Regards,
Shalin Shekhar Mangar.



RE: Transformers in dataconfig xml

2009-03-31 Thread Radha C.

Thanks much 

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Tuesday, March 31, 2009 8:22 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Transformers in dataconfig xml

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

On Tue, Mar 31, 2009 at 7:38 PM, Radha C. cra...@ceiindia.com wrote:
 Hi,

 Is there any documentation available for usage of transformers in 
 dataimport. If so can anyone tell me the url ?

 Thanks




--
--Noble Paul



How to configure multible unique keys in schema.xml

2009-03-31 Thread Radha C.
Hi,

Is it possible to configure/index separate set of tables with one solr
core.( groupA- 6 related tables and groupB - 8 related tables and group AB
are unrelated ) ?

Is it so, how to include/index the table's unique keys in the schema.xml?

Can anyone please provide me any documentation link. I did not get any clear
documentation on this.

 



Not getting the proper result.

2009-03-30 Thread Radha C.
Hi,
 
I am having following analyzer set up in schema.xml
fieldType name=text class=solr.TextField positionIncrementGap=100
 analyzer
  tokenizer class=solr.StandardTokenizerFactory/
  filter class=solr.StandardFilterFactory/
  filter class=solr.LowerCaseFilterFactory/  
 /analyzer
  /fieldType
 
I am indexing a database field which contains L.I.C and I am trying to
search the field as follows but getting zero response.
http://localhost:8080/solr/select/?q=LIC
http://localhost:8080/solr/select/?q=LICdebugQuery=on debugQuery=on and
http://localhost:8080/solr/select/?q=lic
http://localhost:8080/solr/select/?q=licdebugQuery=on debugQuery=on
 
But it is giving result for  q=L.I.C
 
It is not identifying the L.I.C and lic .  what is the wrong here? can
anyone help me ?
 
Thanks


indexing mutiple table

2009-03-26 Thread Radha C.
Hi,
 
I am trying to index different tables with different primary keys and
different fields.
 
Table A - primary field is a_id
Table B - primary fiedls is b_id
 
How to specify two different primary keys for two different tables in
schema.xml?
 
Is it possible to create a data-config with different root
entities/documents and index/search everything?
 
Thanks in advance. 
 


RE: indexing mutiple table

2009-03-26 Thread Radha C.
Thanks for your reply.
 
If I want to search the my data spread over many tables say more than 50
tables, then I have to setup that many cores ?

  _  

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com] 
Sent: Thursday, March 26, 2009 5:04 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: indexing mutiple table


Hello,
 
I believe you should use 2 different indexes, 2 different cores and write a
custom request handler or any other client that forwards the query to the
cores and merge the results.
 
Cheers,
Giovanni

 
On 3/26/09, Radha C. cra...@ceiindia.com wrote: 

Hi,

I am trying to index different tables with different primary keys and
different fields.

Table A - primary field is a_id
Table B - primary fiedls is b_id

How to specify two different primary keys for two different tables in
schema.xml?

Is it possible to create a data-config with different root
entities/documents and index/search everything?

Thanks in advance.






RE: indexing mutiple table

2009-03-26 Thread Radha C.
Giovanni,
 
Much Thanks for the reply.
 
We are having seperate set of tables for each task. So we are going to
provide different search based on the task. The tables of one task are
unrelated to tables of another task.
 

  _  

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com] 
Sent: Thursday, March 26, 2009 5:51 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: indexing mutiple table


Hello,
 
that might be a solution although it is a maintenance nightmare...
 
Are all those tables completely unrelated? Meaning does each table produce a
totally different document?
 
Either or when you perform a search you must return a common document
(unless your client is able to distinguish between different documents and
create an ad hoc result).
 
Perhaps you should wait for an answer by one of those who really know about
this stuff...I am pretty new to Solr.
 
Cheers,
Giovanni

 
On 3/26/09, Radha C. cra...@ceiindia.com wrote: 

Thanks for your reply.

If I want to search the my data spread over many tables say more than 50
tables, then I have to setup that many cores ?

_

From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com]
Sent: Thursday, March 26, 2009 5:04 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: indexing mutiple table


Hello,

I believe you should use 2 different indexes, 2 different cores and write a
custom request handler or any other client that forwards the query to the
cores and merge the results.

Cheers,
Giovanni


On 3/26/09, Radha C. cra...@ceiindia.com wrote:

Hi,

I am trying to index different tables with different primary keys and
different fields.

Table A - primary field is a_id
Table B - primary fiedls is b_id

How to specify two different primary keys for two different tables in
schema.xml?

Is it possible to create a data-config with different root
entities/documents and index/search everything?

Thanks in advance.









Error when creating document

2009-03-23 Thread Radha C.
Hi,
 
I am trying to index the rows using dataimporthandler full import. But I am
getting the following error,  please suggest me what went wrong?
Thanks in advance.
 
INFO: Time taken for getConnection(): 406
Mar 23, 2009 11:55:52 AM org.apache.solr.handler.dataimport.SolrWriter
upload
WARNING: Error creating document : SolrInputDocument[{}]
org.apache.solr.common.SolrException: Document [null] missing required
field: person_id
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProc
essorFactory.java:59)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHand
ler.java:263)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:
377)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225
)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:323)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:381
)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:362)
Mar 23, 2009 11:55:52 AM org.apache.solr.handler.dataimport.SolrWriter
upload
WARNING: Error creating document : SolrInputDocument[{}]
org.apache.solr.common.SolrException: Document [null] missing required
field: person_id
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProc
essorFactory.java:59)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHand
ler.java:263)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:
377)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225
)
 
 


RE: Do I need maven build for solrj client?

2009-03-23 Thread Radha C.


Much Thanks !

-Original Message-
From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com] 
Sent: Monday, March 23, 2009 1:34 PM
To: solr-user@lucene.apache.org
Subject: Re: Do I need maven build for solrj client?

Hello,

I have found this simple tutorial here:

http://fisk.stjernesludd.net/archives/2-Using-Solrj-A-short-guide-to-getting
-started-with-Solrj.html

Maybe it helps...

Cheers,
Giovanni



On 3/22/09, Shalin Shekhar Mangar shalinman...@gmail.com wrote:

 On Sun, Mar 22, 2009 at 11:54 PM, radha c radhas...@gmail.com wrote:

  Hi,
  I am trying to write an solrj client. Do I need to do maven builb 
  for
 that.
  Is there any beginners tutorial with the basic framwork for
 solrj.  Thanks
  in advance.
 

 If you are using maven then Solrj is already present in the maven 
 repositories. If you are not using maven, then just add the jar in 
 your project as you would normally do with any other jar.

 There's no tutorial I think but there is a wiki page 
 http://wiki.apache.org/solr/Solrj
 --
 Regards,
 Shalin Shekhar Mangar.




multiple values encountered for non multiValued copy field

2009-03-23 Thread Radha C.
Hi,
 
I am having mutivalued field all in my schema.xml . But it is not
identified and got below error.
Can anyone help me with this..
 
schema name=DIT version=1.1
  types
 fieldType name=string class=solr.StrField sortMissingLast=true
omitNorms=true/
   fieldType name=text class=solr.TextField
positionIncrementGap=100/
   fieldType name=integer class=solr.IntField omitNorms=true/   
  /types
 
 fields
   field name=person_id type=integer indexed=true stored=true
multivalued=false required=true/
   field name=fname type=text indexed=true stored=true
multivalued=false/
field name=all type=text indexed=true stored=true
multivalued=true/
 /fields
 uniqueKeyperson_id/uniqueKey
 defaultSearchFieldall/defaultSearchField
 solrQueryParser defaultOperator=OR/
 copyField source=person_id dest=all/
 copyField source=fname dest=all/ 
/schema
 
INFO: Time taken for getConnection(): 360
Mar 23, 2009 1:51:25 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document :
SolrInputDocument[{fname=fname(1.0)={Peter}, person_id=person_id(1.0)={1}}]
org.apache.solr.common.SolrException: ERROR: multiple values encountered for
non multiValued copy field all: 1
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:256)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProc
essorFactory.java:59)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHand
ler.java:263)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:
377)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225
)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:323)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:381
)
 


RE: multiple values encountered for non multiValued copy field

2009-03-23 Thread Radha C.
That works thanks!

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Monday, March 23, 2009 2:11 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: multiple values encountered for non multiValued copy field


multiValued should be camel cased but in your schema it is in lowercase.


On Mon, Mar 23, 2009 at 1:57 PM, Radha C. cra...@ceiindia.com wrote:


Hi,

I am having mutivalued field all in my schema.xml . But it is not
identified and got below error.
Can anyone help me with this..

schema name=DIT version=1.1
 types
 fieldType name=string class=solr.StrField sortMissingLast=true
omitNorms=true/
  fieldType name=text class=solr.TextField
positionIncrementGap=100/
  fieldType name=integer class=solr.IntField omitNorms=true/
 /types

 fields
  field name=person_id type=integer indexed=true stored=true
multivalued=false required=true/
  field name=fname type=text indexed=true stored=true
multivalued=false/
field name=all type=text indexed=true stored=true
multivalued=true/
 /fields
 uniqueKeyperson_id/uniqueKey
 defaultSearchFieldall/defaultSearchField
 solrQueryParser defaultOperator=OR/
 copyField source=person_id dest=all/
 copyField source=fname dest=all/
/schema

INFO: Time taken for getConnection(): 360
Mar 23, 2009 1:51:25 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document :
SolrInputDocument[{fname=fname(1.0)={Peter}, person_id=person_id(1.0)={1}}]
org.apache.solr.common.SolrException: ERROR: multiple values encountered for
non multiValued copy field all: 1
   at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:256)
   at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProc
essorFactory.java:59)
   at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
   at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHand
ler.java:263)
   at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:
377)
   at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225
)
   at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
   at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.ja
va:323)
   at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:381
)






-- 
Regards,
Shalin Shekhar Mangar.



How to use standalone solrj client

2009-03-23 Thread Radha C.
Can anyone tell me how to use the solrj Java client?
I have wriiten a simple standalone main() class. My solr home and server is
there in tomcat. 
I am not sure how to test my solrj client. 
 
 
Thanks,
Radha.C
 


RE: How to use standalone solrj client

2009-03-23 Thread Radha C.

 
Hi,

I have written my solrj client with the maven build structure. I want to
download the dependant solrj jar files from
SVN. Can anyone please tel me is there any common svbn repository for solr
related files.


Thanks

-Original Message-
From: Radha C. [mailto:cra...@ceiindia.com] 
Sent: Monday, March 23, 2009 2:58 PM
To: solr-user@lucene.apache.org
Subject: How to use standalone solrj client 

Can anyone tell me how to use the solrj Java client?
I have wriiten a simple standalone main() class. My solr home and server is
there in tomcat. 
I am not sure how to test my solrj client. 
 
 
Thanks,
Radha.C
 



Error when execute the solrj client

2009-03-23 Thread Radha C.
I am getting the following error when executing solrj client. 
 
Can anyone aware of this error, any help will be great. Thanks in advance.
 
org.apache.solr.client.solrj.SolrServerException: Error executing query
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:
96)
at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:113)
at SolrjTest.query(SolrjTest.java:36)
at SolrjTest.main(SolrjTest.java:72)
Caused by: org.apache.solr.common.SolrException: /solr/select
 
/solr/select
request: http://localhost:8080/solr/select?q=Glenn
http://localhost:8080/solr/select?q=Glennwt=javabin wt=javabin
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:428)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpS
olrServer.java:245)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:
90)
... 3 more
 
Here is my java client
 
import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.SolrDocument;
import java.util.Map;
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;
 
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.client.solrj.response.FacetField;
 

class SolrjTest
{
public void query(String q)
{
CommonsHttpSolrServer server = null;
 
try
{
server = new
CommonsHttpSolrServer(http://localhost:8080/solr/;);
}
catch(Exception e)
{
e.printStackTrace();
}
 
SolrQuery query = new SolrQuery();
query.setQuery(q); 
 
try
{
QueryResponse qr = server.query(query);
 
SolrDocumentList sdl = qr.getResults();
 
System.out.println(Found:  + sdl.getNumFound());
System.out.println(Start:  + sdl.getStart());
System.out.println(Max Score:  + sdl.getMaxScore());
System.out.println();
 
ArrayListHashMapString, Object hitsOnPage = new
ArrayListHashMapString, Object();
 
for(SolrDocument d : sdl)
{
HashMapString, Object values = new HashMapString,
Object();
 
for(IteratorMap.EntryString, Object i = d.iterator();
i.hasNext(); )
{
Map.EntryString, Object e2 = i.next();
 
values.put(e2.getKey(), e2.getValue());
}
 
hitsOnPage.add(values);
System.out.println(values.get(displayname) +  ( +
values.get(displayphone) + ));
}
}
catch (SolrServerException e)
{
e.printStackTrace();
}
 
}
 
public static void main(String[] args)
{
SolrjTest solrj = new SolrjTest();
solrj.query(Glenn);
}
}




RE: Error when execute the solrj client

2009-03-23 Thread Radha C.

Thanks for your reply.

The problem was server instance. I configured different version of tomcat which 
does not have the solr server in my net beans. I changed the tomcat in which 
solr server runs. Now it works.   

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Monday, March 23, 2009 5:01 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Error when execute the solrj client

just hit solr with a browser with the url 
http://localhost:8080/solr/select?q=Glenn
and see if it works.
--Noble

On Mon, Mar 23, 2009 at 4:36 PM, Radha C. cra...@ceiindia.com wrote:
 I am getting the following error when executing solrj client.

 Can anyone aware of this error, any help will be great. Thanks in advance.

 org.apache.solr.client.solrj.SolrServerException: Error executing 
 query
at
 org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:
 96)
at
 org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:113)
at SolrjTest.query(SolrjTest.java:36)
at SolrjTest.main(SolrjTest.java:72) Caused by: 
 org.apache.solr.common.SolrException: /solr/select

 /solr/select
 request: http://localhost:8080/solr/select?q=Glenn
 http://localhost:8080/solr/select?q=Glennwt=javabin wt=javabin
at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpS
 olrServer.java:428)
at
 org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(Common
 sHttpS
 olrServer.java:245)
at
 org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:
 90)
... 3 more

 Here is my java client

 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrDocument;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.HashMap;

 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.client.solrj.response.FacetField;


 class SolrjTest
 {
public void query(String q)
{
CommonsHttpSolrServer server = null;

try
{
server = new
 CommonsHttpSolrServer(http://localhost:8080/solr/;);
}
catch(Exception e)
{
e.printStackTrace();
}

SolrQuery query = new SolrQuery();
query.setQuery(q);

try
{
QueryResponse qr = server.query(query);

SolrDocumentList sdl = qr.getResults();

System.out.println(Found:  + sdl.getNumFound());
System.out.println(Start:  + sdl.getStart());
System.out.println(Max Score:  + sdl.getMaxScore());
System.out.println();

ArrayListHashMapString, Object hitsOnPage = new 
 ArrayListHashMapString, Object();

for(SolrDocument d : sdl)
{
HashMapString, Object values = new HashMapString,
 Object();

for(IteratorMap.EntryString, Object i = 
 d.iterator(); i.hasNext(); )
{
Map.EntryString, Object e2 = i.next();

values.put(e2.getKey(), e2.getValue());
}

hitsOnPage.add(values);
System.out.println(values.get(displayname) +  ( +
 values.get(displayphone) + ));
}
}
catch (SolrServerException e)
{
e.printStackTrace();
}

}

public static void main(String[] args)
{
SolrjTest solrj = new SolrjTest();
solrj.query(Glenn);
}
 }






--
--Noble Paul



Re: Error in identifying the primary key

2009-03-22 Thread radha c
Thanks a lot Nobel,

I missed primary field definition in the schema.xml. I added the field
definition and it is working now.

2009/3/20 Noble Paul നോബിള്‍ नोब्ळ् noble.p...@gmail.com

 for all the fields mentioned in data-config.xml there should be a
 counterpart in schema.xml

 anyway that is relaxed in the latest nightly



 On Fri, Mar 20, 2009 at 6:26 PM, radha c radhas...@gmail.com wrote:
  Hi,
 
  I am new to Solr. I am trying to index SQL table rows.
  I am getting the below error. Can anyone help me in resolving this issue.
 
  Mar 20, 2009 6:03:38 PM org.apache.solr.handler.dataimport.DataImporter
  verifyWithSchema
  INFO: id is a required field in SolrSchema . But not found in DataConfig
  Mar 20, 2009 6:03:38 PM
 org.apache.solr.handler.dataimport.DataImportHandler
  inform
  SEVERE: Exception while loading DataImporter
  org.apache.solr.handler.dataimport.DataImportHandlerException: There are
  errors in the Schema
  The field :age present in DataConfig does not have a counterpart in Solr
  Schema
  The field :firstname present in DataConfig does not have a counterpart in
  Solr Schema
  The field :lastName present in DataConfig does not have a counterpart in
  Solr Schema
 
 at
 
 org.apache.solr.handler.dataimport.DataImporter.init(DataImporter.java:108)
 at
 
 org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:95)
 at
 
 org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
 at org.apache.solr.core.SolrCore.init(SolrCore.java:571)
 at
 
 org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:121)
 at
 
 org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
 at
 
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
 at
 
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at
 
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)
 at
 
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
 at
 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at
  org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at
  org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at
  org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
 at
  org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
 at
  org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
 at
  org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
 at
 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at
 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at
  org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at
  org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at
  org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at
  org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
  Mar 20, 2009 6:03:38 PM org.apache.solr.servlet.SolrDispatchFilter init
  SEVERE: Could not start SOLR. Check solr/home property
  org.apache.solr.common.SolrException: FATAL: Could not create importer.
  DataImporter config invalid
 at
 
 org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:103)
 at
 
 org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
 at org.apache.solr.core.SolrCore.init(SolrCore.java:571)
 at
 
 org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:121)
 at
 
 org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
 
  Thanks
 



 --
 --Noble Paul



could not search the indexed table data

2009-03-22 Thread radha c
Hi,
I am just in learning face. I indexed a sql test table using dataimport.
But I want to search those index by keyword. I tried to search like
http://localhost:8080/solr/select/?q=Peter. But I got zero respone.
Can anyone help me please why is this?
Thanks in advance.


Re: could not search the indexed table data

2009-03-22 Thread radha c
Thanks for your reply,
Yes, I have tabel persons and Peter value in column firstname . and here
is my data-config.xml
dataConfig
dataSource 
entity name=persons pk=person_id query=select
personid,firstname from persons 
field column=personid name=person_id /
field column=fisrtname name=fname /
   /entity
/document
/dataConfig

and my schema.xml
schema name=example
 types
   fieldType name=text class=solr.TextField
positionIncrementGap=100/
   fieldType name=integer class=solr.IntField omitNorms=true/
  /types
 fields
   field name=person_id type=integer indexed=true stored=true
multivalued=false required=true/
   field name=fname type=text indexed=true stored=true
multivalued=false/
/fields
 uniqueKeyperson_id/uniqueKey
 solrQueryParser defaultOperator=OR/
   /schema
It is indexed properly. But I am not getting any result. Do I need to do
explicit commit?
Or Am I quering correctly http://localhost:8080/solr/select/?q=Peter ?



2009/3/22 Noble Paul നോബിള്‍ नोब्ळ् noble.p...@gmail.com

 it is hard to say the reason.
 do you have the field containing Peter in the default search field?
 what is the type of the field?

 On Sun, Mar 22, 2009 at 9:16 PM, radha c radhas...@gmail.com wrote:
  Hi,
  I am just in learning face. I indexed a sql test table using dataimport.
  But I want to search those index by keyword. I tried to search like
  http://localhost:8080/solr/select/?q=Peter. But I got zero respone.
  Can anyone help me please why is this?
  Thanks in advance.
 



 --
 --Noble Paul



Re: could not search the indexed table data

2009-03-22 Thread radha c
Oops.. Thanks a lot. I got a bit tired :-)

Thanks

2009/3/22 Noble Paul നോബിള്‍ नोब्ळ् noble.p...@gmail.com

 there is a typo in the column value

 field column=fisrtname name=fname /

 the schema does not say whether fname goes into a default search field


 On Sun, Mar 22, 2009 at 11:10 PM, radha c radhas...@gmail.com wrote:
  Thanks for your reply,
  Yes, I have tabel persons and Peter value in column firstname . and
 here
  is my data-config.xml
  dataConfig
 dataSource 
 entity name=persons pk=person_id query=select
  personid,firstname from persons 
 field column=personid name=person_id /
 field column=fisrtname name=fname /
/entity
 /document
  /dataConfig
 
  and my schema.xml
  schema name=example
   types
fieldType name=text class=solr.TextField
  positionIncrementGap=100/
fieldType name=integer class=solr.IntField omitNorms=true/
   /types
   fields
field name=person_id type=integer indexed=true stored=true
  multivalued=false required=true/
field name=fname type=text indexed=true stored=true
  multivalued=false/
 /fields
   uniqueKeyperson_id/uniqueKey
   solrQueryParser defaultOperator=OR/
/schema
  It is indexed properly. But I am not getting any result. Do I need to do
  explicit commit?
  Or Am I quering correctly http://localhost:8080/solr/select/?q=Peter ?
 
 
 
  2009/3/22 Noble Paul നോബിള്‍ नोब्ळ् noble.p...@gmail.com
 
  it is hard to say the reason.
  do you have the field containing Peter in the default search field?
  what is the type of the field?
 
  On Sun, Mar 22, 2009 at 9:16 PM, radha c radhas...@gmail.com wrote:
   Hi,
   I am just in learning face. I indexed a sql test table using
 dataimport.
   But I want to search those index by keyword. I tried to search like
   http://localhost:8080/solr/select/?q=Peter. But I got zero respone.
   Can anyone help me please why is this?
   Thanks in advance.
  
 
 
 
  --
  --Noble Paul
 
 



 --
 --Noble Paul



Do I need maven build for solrj client?

2009-03-22 Thread radha c
Hi,
I am trying to write an solrj client. Do I need to do maven builb for that.
Is there any beginners tutorial with the basic framwork for solrj.  Thanks
in advance.


Error in identifying the primary key

2009-03-20 Thread radha c
Hi,

I am new to Solr. I am trying to index SQL table rows.
I am getting the below error. Can anyone help me in resolving this issue.

Mar 20, 2009 6:03:38 PM org.apache.solr.handler.dataimport.DataImporter
verifyWithSchema
INFO: id is a required field in SolrSchema . But not found in DataConfig
Mar 20, 2009 6:03:38 PM org.apache.solr.handler.dataimport.DataImportHandler
inform
SEVERE: Exception while loading DataImporter
org.apache.solr.handler.dataimport.DataImportHandlerException: There are
errors in the Schema
The field :age present in DataConfig does not have a counterpart in Solr
Schema
The field :firstname present in DataConfig does not have a counterpart in
Solr Schema
The field :lastName present in DataConfig does not have a counterpart in
Solr Schema

at
org.apache.solr.handler.dataimport.DataImporter.init(DataImporter.java:108)
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:95)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
at org.apache.solr.core.SolrCore.init(SolrCore.java:571)
at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:121)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Mar 20, 2009 6:03:38 PM org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
org.apache.solr.common.SolrException: FATAL: Could not create importer.
DataImporter config invalid
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:103)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
at org.apache.solr.core.SolrCore.init(SolrCore.java:571)
at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:121)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)

Thanks


Unknown FieldType: 'string' used in QueryElevationComponent

2009-03-20 Thread radha c
Hi,

I am having below schema.xml, I did not define any string field. But I am
getting the below error when I start Tomcat,
Can anyone please suggest me what is the issue here.

WARNING: No queryConverter defined, using default converter
Mar 20, 2009 7:31:55 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to searc...@fe135d main
Mar 20, 2009 7:31:55 PM org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
org.apache.solr.common.SolrException: Unknown FieldType: 'string' used in
QueryElevationComponent
at
org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:151)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
at org.apache.solr.core.SolrCore.init(SolrCore.java:571)


schema name=example
 types
   fieldType name=text class=solr.TextField
positionIncrementGap=100/
   fieldType name=integer class=solr.IntField omitNorms=true/
  /types
 fields
  !-- BOOKS --
   field name=person_id type=integer indexed=true stored=true
multivalued=false required=true/
   field name=first_name type=text indexed=true stored=true
multivalued=false/
   field name=last_name type=text indexed=true stored=true
multivalued=false/
   field name=_age type=integer indexed=true stored=true
multivalued=false/
   field name=all type=text indexed=true stored=true
multivalued=true/
 /fields
 uniqueKeyperson_id/uniqueKey
 defaultSearchFieldall/defaultSearchField
 solrQueryParser defaultOperator=OR/
copyField source=first_name dest=all/
   copyField source=last_name dest=all/
   copyField source=_age dest=all/
/schema


Solr java client using solrj API

2009-03-05 Thread Radha C.
 
Hi,
 
We are planning to use solr search server for our database content search,
so we have a plan to create our own java client.
Does solrj API provide the facilities to create java client for our database
search? Where I can get the information about the integration of oracle
content +solr search server+java client using solrj API. Any help will be
appriciated.
 
Thanks,


RE: How to search the database tables using solr.

2009-03-05 Thread Radha C.

Hi,

I am newbie for solr search engin. I don't find any juicy information on how
to configure the ORACLE data base to index the tables using solr search
engin. There are huge documents spread over wiki pages. I need some core
information. 
I am using Apache-tomcat 5.5.26, and oracle 9i. Can you please provide me a
brief details for installing and configuring the database with solr and how
to indexing the rows. Your help will really save lot of my time. 

-Original Message-
From: Venu Mittal [mailto:metale...@yahoo.com] 
Sent: Thursday, March 05, 2009 1:14 PM
To: solr-user@lucene.apache.org
Subject: Re: How to search the database tables using solr.

Does anybody has any stats to share on how much time does DataImportHandler
takes to index a given set of data ?

I am currently indexing 18 millions rows in 1.5 - 2 hours by sending xmls to
solr. 




From: Shalin Shekhar Mangar shalinman...@gmail.com
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Sent: Wednesday, March 4, 2009 8:15:07 AM
Subject: Re: How to search the database tables using solr.

On Wed, Mar 4, 2009 at 7:51 PM, Radha C. cra...@ceiindia.com wrote:

 Thanks Shalin,

 We just stepped on solr. This information is very much useful for me. 
 But before that I want some clear details about where to start..
 I want to test this in my local environment, so I need some basic 
 information about how to start using this ( database and solr ). Do 
 you have some information on this?


I think the easiest way is to start using Solr is with the embedded jetty
container. Modify the example/conf/schema.xml file and add your own fields
etc. Read through the DataImportHandler wiki page and at the
example/example-DIH directory in the solr zip/tarball.

If you have a specific doubt/question, ask on the list.

--
Regards,
Shalin Shekhar Mangar.



  



RE: Solr java client using solrj API

2009-03-05 Thread Radha C.

Thanks, my client will send the query to solr and retrive the result from solr, 
so solrj is having this facilities and I can use this API. 
 

-Original Message-
From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:noble.p...@gmail.com] 
Sent: Thursday, March 05, 2009 4:55 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: Solr java client using solrj API

if you wish to search the content in your DB , you will need to index it first 
to Solr.
the search can be done on Solr and if you are using java , you can use SolrJ 
for that.
--Noble

On Thu, Mar 5, 2009 at 4:29 PM, Radha C. cra...@ceiindia.com wrote:

 Hi,

 We are planning to use solr search server for our database content 
 search, so we have a plan to create our own java client.
 Does solrj API provide the facilities to create java client for our 
 database search? Where I can get the information about the integration 
 of oracle content +solr search server+java client using solrj API. Any 
 help will be appriciated.

 Thanks,




--
--Noble Paul



RE: How to search the database tables using solr.

2009-03-05 Thread Radha C.
Shalin,
 
I  did not run the examples because in the demo everything is already
configured and built in, so the demo will run properly. 
So I am not clear about how the example is working and what is the
configuration done for that, Where to start if I write a small new database
search. 
I want to understand fully what is configured and how to configure , So I
tried to index my local MySql DB directly with one simple table called
persons in it.
But I am getting lot of errors. the following are the steps I did,
1.   downloaded solr-2009-03-03.zip
http://people.apache.org/builds/lucene/solr/nightly/solr-2009-03-03.zip
distribution and extracted to d:/solrtemp/
2.   copied the example/solr to d:/solr ( this is my solr home ) for my
application template.
3.   set this solr home insidecatalina-home/localconfig/solr.xml
4.   create the data-config under $solrhome/config
here is my dataconfig file
dataConfig
dataSource driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/test user=xxx password= /
document name=employees
entity name=persons pk=personid query=select * from
persons deltaQuery=select personID from persons where last_modified 
'${dataimporter.last_index_time}'
field column=firstname/
field column=lastName/
field column=age/
/entity
/document
/dataConfig
 
 I am not sure what needs to be done next. I am getting error when I start
tomcat.
 
Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImportHandler
processConfiguration
INFO: Processing configuration from solrconfig.xml: {config=data-config.xml}
Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImporter
loadDataConfig
INFO: Data Configuration loaded successfully
Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImporter
verifyWithSchema
INFO: id is a required field in SolrSchema . But not found in DataConfig
Mar 5, 2009 9:10:28 PM org.apache.solr.handler.dataimport.DataImportHandler
inform
SEVERE: Exception while loading DataImporter
org.apache.solr.handler.dataimport.DataImportHandlerException: There are
errors in the Schema
The field :age present in DataConfig does not have a counterpart in Solr
Schema
The field :firstname present in DataConfig does not have a counterpart in
Solr Schema
The field :personid present in DataConfig does not have a counterpart in
Solr Schema
The field :lastName present in DataConfig does not have a counterpart in
Solr Schema
at
org.apache.solr.handler.dataimport.DataImporter.init(DataImporter.java:108
)
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle
r.java:95)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
at
org.apache.solr.core.SolrCore.init(SolrCore.java:571).
.  
Mar 5, 2009 9:10:28 PM org.apache.solr.servlet.SolrDispatchFilter init
SEVERE: Could not start SOLR. Check solr/home property
org.apache.solr.common.SolrException: FATAL: Could not create importer.
DataImporter config invalid
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle
r.java:103)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException:
There are errors in the Schema
The field :age present in DataConfig does not have a counterpart in Solr
Schema
The field :firstname present in DataConfig does not have a counterpart in
Solr Schema
The field :personid present in DataConfig does not have a counterpart in
Solr Schema
The field :lastName present in DataConfig does not have a counterpart in
Solr Schema
at
org.apache.solr.handler.dataimport.DataImporter.init(DataImporter.java:108
)
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandle
r.java:95)
... 31 more
Mar 5, 2009 9:10:28 PM org.apache.solr.core.QuerySenderListener newSearcher
 
I want to write a small seperate application without relying on examples,
can you provide me some useful steps how to do that.
 
Thanks

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Thursday, March 05, 2009 5:16 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: How to search the database tables using solr.


On Thu, Mar 5, 2009 at 4:42 PM, Radha C. cra...@ceiindia.com wrote:



Hi,

I am newbie for solr search engin. I don't find any juicy information on how
to configure the ORACLE data base to index the tables using solr search
engin. There are huge documents spread over wiki pages. I need some core
information.
I am using Apache-tomcat 5.5.26, and oracle 9i. Can you please provide me a
brief details for installing and configuring the database with solr and how
to indexing the rows. Your help will really save lot of my time.




Have you been able to run

How to search the database tables using solr.

2009-03-04 Thread Radha C.
Hi,
 
I am working in a software concern. We are having some RD base work like
making use of solr search tool for searching our Oracle database
content. I read through the documnets provided in the site, there I found
the solr supports only the document search and we have to provide the
document in the xml with the whole content that we need to search. But Is
there any way to index our database content and search the indexed database
content.
 
Any help will be appriciated. Thanks.


RE: How to search the database tables using solr.

2009-03-04 Thread Radha C.
Thanks Shalin,
 
We just stepped on solr. This information is very much useful for me. But
before that I want some clear details about where to start..
I want to test this in my local environment, so I need some basic
information about how to start using this ( database and solr ). Do you have
some information on this?
 
Thanks in advance.
 

  _  

From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Wednesday, March 04, 2009 7:48 PM
To: solr-user@lucene.apache.org; cra...@ceiindia.com
Subject: Re: How to search the database tables using solr.


On Wed, Mar 4, 2009 at 7:32 PM, Radha C. cra...@ceiindia.com wrote:


Hi,

I am working in a software concern. We are having some RD base work like
making use of solr search tool for searching our Oracle database
content. I read through the documnets provided in the site, there I found
the solr supports only the document search and we have to provide the
document in the xml with the whole content that we need to search. But Is
there any way to index our database content and search the indexed database
content.



Take a look at DataImportHandler.

http://wiki.apache.org/solr/DataImportHandler
-- 
Regards,
Shalin Shekhar Mangar.