Analyzer Tokenizer for Exact and Contains search on single field

2011-10-04 Thread Satish Talim
I am a Solr newbie.

Let's say we have a field with 4 records as follows:

James
James Edward
James Edward Gray
JamesEdward

a. In Solr 3.4, I want an exact search on the given field for James
Edward. Record 2 should be returned.

b. Next on the same field, I want to check whether James is contained in
the field, then records 1, 2 and 3 should be returned.

Which standard analyzer, tokenizer can one apply on one single field, to get
these results?

Satish


Re: shareSchema=true - location of schema.xml?

2011-08-31 Thread Satish Talim
I am experimenting Solr on Windows, for now.

Satish

2011/8/31 François Schiettecatte fschietteca...@gmail.com

 Satish

 You don't say which platform you are on but have you tried links (with ln
 on linux/unix) ?

 François

 On Aug 31, 2011, at 12:25 AM, Satish Talim wrote:

  I have 1000's of cores and to reduce the cost of loading unloading
  schema.xml, I have my solr.xml as mentioned here -
  http://wiki.apache.org/solr/CoreAdmin
  namely:
 
  solr
   cores adminPath=/admin/cores shareSchema=true
 ...
   /cores
  /solr
 
  However, I am not sure where to keep the common schema.xml file? In which
  case, do I need the schema.xml in the conf folder of each and every core?
 
  My folder structure is:
 
  multicore (contains solr.xml)
 |_ core0
  |_ conf
  ||_ schema.xml
  ||_ solrconfig.xml
  ||_ other files
core1
  |_ conf
  ||_ schema.xml
  ||_ solrconfig.xml
  ||_ other files
  |
exampledocs (contains 1000's of .csv files and post.jar)
 
  Satish




Re: How to send an OpenBitSet object from Solr server?

2011-08-30 Thread Satish Talim
But how to throw? As a stream of bits?

Satish

On Tue, Aug 30, 2011 at 5:39 PM, Federico Fissore feder...@fissore.orgwrote:

 Satish Talim, il 30/08/2011 05:42, ha scritto:
 [...]


 Is there a work-around wherein I can send an OpenBitSet object?


 JavaBinCodec (used by default by solr) supports writing arrays. you can
 getBits() from openbitset and throw them into the binary response

 federico



Re: How to send an OpenBitSet object from Solr server?

2011-08-30 Thread Satish Talim
I was not referring to Lucene's doc ids but the doc numbers (unique key)

Satish



On Tue, Aug 30, 2011 at 9:28 PM, Chris Hostetter
hossman_luc...@fucit.orgwrote:


 : We have a need to query and fetch millions of document ids from a Solr
 3.3
 : index and convert the same to a BitSet. To speed things up, we want to
 : convert these document ids into OpenBitSet on the server side, put them
 into
 : the response object and read the same on the client side.

 This smells like an XY Problem ... what do you intend to do with this
 BitSet on the client side?  the lucene doc ids are meaningless outside of
 hte server, and for any given doc, the id could change from one request to
 the next -- so how would having this data on the clinet be of any use to
 you?

 https://people.apache.org/~hossman/#xyproblem
 XY Problem

 Your question appears to be an XY Problem ... that is: you are dealing
 with X, you are assuming Y will help you, and you are asking about Y
 without giving more details about the X so that we can understand the
 full issue.  Perhaps the best solution doesn't involve Y at all?
 See Also: http://www.perlmonks.org/index.pl?node_id=542341


 -Hoss



shareSchema=true - location of schema.xml?

2011-08-30 Thread Satish Talim
I have 1000's of cores and to reduce the cost of loading unloading
schema.xml, I have my solr.xml as mentioned here -
http://wiki.apache.org/solr/CoreAdmin
namely:

solr
  cores adminPath=/admin/cores shareSchema=true
...
  /cores
/solr

However, I am not sure where to keep the common schema.xml file? In which
case, do I need the schema.xml in the conf folder of each and every core?

My folder structure is:

 multicore (contains solr.xml)
|_ core0
 |_ conf
 ||_ schema.xml
 ||_ solrconfig.xml
 ||_ other files
   core1
 |_ conf
 ||_ schema.xml
 ||_ solrconfig.xml
 ||_ other files
 |
   exampledocs (contains 1000's of .csv files and post.jar)

Satish


How to send an OpenBitSet object from Solr server?

2011-08-29 Thread Satish Talim
We have a need to query and fetch millions of document ids from a Solr 3.3
index and convert the same to a BitSet. To speed things up, we want to
convert these document ids into OpenBitSet on the server side, put them into
the response object and read the same on the client side.

To achieve this, we wrote our own RequestHandler and overwrote
the handleRequest method. Using this RequestHandler we do get the response
object but when we try to fetch the OpenBitSet we get an error -

Exception in thread main java.lang.ClassCastException: java.lang.String
cannot be cast to org.apache.lucene.util.OpenBitSet

The documentation at -
http://lucene.apache.org/solr/api/org/apache/solr/response/SolrQueryResponse.html

says that Other data types may be added to the SolrQueryResponse, but there
is no guarantee that QueryResponseWriters will be able to deal with
unexpected types.

Is there a work-around wherein I can send an OpenBitSet object?

Satish


Re: Multiple Cores on different machines?

2011-08-09 Thread Satish Talim
Chris, sorry for not being clear when I asked the question.

We are still experimenting with Solr. We have 2 tables in Postgres that we
want to migrate to Solr for faster query results. One index is of static
data and the other related index would be of data that changes once or twice
a month. Some are proposing a single (flat) index in Solr for both these
tables. Others are suggesting 2 separate indexes on 2 different machines and
using SOLRs capacity to combine cores and generate a third index that
denormalizes the tables for us.

Query on a flat index is extremely fast and we wanted to compare the results
with separate indexes.

Satish


On Wed, Aug 10, 2011 at 1:08 AM, Chris Hostetter
hossman_luc...@fucit.orgwrote:


 : A quick question - is it possible to have 2 cores in Solr on two
 different
 : machines?

 your question is a little vague ... like asking is it possible to have to
 have two betamax VCRs in two different rooms of my house ... sure, if you
 want ... but why are you asking the question?  are you expecting those
 VCRs to be doing something special that makes you wonder if that special
 thing will work when there are two of them?

 https://people.apache.org/~hossman/#xyproblem
 XY Problem

 Your question appears to be an XY Problem ... that is: you are dealing
 with X, you are assuming Y will help you, and you are asking about Y
 without giving more details about the X so that we can understand the
 full issue.  Perhaps the best solution doesn't involve Y at all?
 See Also: http://www.perlmonks.org/index.pl?node_id=542341


 -Hoss



Re: SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.ICUTokenizerFactory'

2011-08-03 Thread Satish Talim
Guys, I am still stuck. Any help?

Thanks,

Satish

On Tue, Aug 2, 2011 at 5:23 PM, Robert Muir rcm...@gmail.com wrote:

 did you add the analysis-extras jar itself? thats what has this factory.

 On Tue, Aug 2, 2011 at 5:03 AM, Satish Talim satish.ta...@gmail.com
 wrote:
  I am using Solr 3.3 on a Windows box.
 
  I want to use the solr.ICUTokenizerFactory in my schema.xml and added the
  fieldType name=text_icu as per the URL -
 
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ICUTokenizerFactory
 
  I also added the following files to my apache-solr-3.3.0\example\lib
 folder:
  lucene-icu-3.3.0.jar
  lucene-smartcn-3.3.0.jar
  icu4j-4_8.jar
  lucene-stempel-3.3.0.jar
 
  When I start my Solr server from apache-solr-3.3.0\example folder:
  java -jar start.jar
 
  I get the following errors:
 
  SEVERE: org.apache.solr.common.SolrException: Error loading class
  'solr.ICUTokenizerFactory'
 
  SEVERE: org.apache.solr.common.SolrException: analyzer without class or
  tokenizer  filter list
 
  SEVERE: org.apache.solr.common.SolrException: Unknown fieldtype
 'text_icu'
  specified on field subject
 
  I tried adding various other jar files to the lib folder but it does not
  help.
 
  What am I doing wrong?
 
  Satish
 




SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.ICUTokenizerFactory'

2011-08-02 Thread Satish Talim
I am using Solr 3.3 on a Windows box.

I want to use the solr.ICUTokenizerFactory in my schema.xml and added the
fieldType name=text_icu as per the URL -
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ICUTokenizerFactory

I also added the following files to my apache-solr-3.3.0\example\lib folder:
lucene-icu-3.3.0.jar
lucene-smartcn-3.3.0.jar
icu4j-4_8.jar
lucene-stempel-3.3.0.jar

When I start my Solr server from apache-solr-3.3.0\example folder:
java -jar start.jar

I get the following errors:

SEVERE: org.apache.solr.common.SolrException: Error loading class
'solr.ICUTokenizerFactory'

SEVERE: org.apache.solr.common.SolrException: analyzer without class or
tokenizer  filter list

SEVERE: org.apache.solr.common.SolrException: Unknown fieldtype 'text_icu'
specified on field subject

I tried adding various other jar files to the lib folder but it does not
help.

What am I doing wrong?

Satish


Re: SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.ICUTokenizerFactory'

2011-08-02 Thread Satish Talim
I copied the file apache-solr-analysis-extras-3.3.0.jar into solr's lib
folder. Now the error is different -

SEVERE: java.lang.NoClassDefFoundError:
org/apache/solr/analysis/BaseTokenizerFactory

Please help.

Satish

On Tue, Aug 2, 2011 at 5:23 PM, Robert Muir rcm...@gmail.com wrote:

 did you add the analysis-extras jar itself? thats what has this factory.

 On Tue, Aug 2, 2011 at 5:03 AM, Satish Talim satish.ta...@gmail.com
 wrote:
  I am using Solr 3.3 on a Windows box.
 
  I want to use the solr.ICUTokenizerFactory in my schema.xml and added the
  fieldType name=text_icu as per the URL -
 
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ICUTokenizerFactory
 
  I also added the following files to my apache-solr-3.3.0\example\lib
 folder:
  lucene-icu-3.3.0.jar
  lucene-smartcn-3.3.0.jar
  icu4j-4_8.jar
  lucene-stempel-3.3.0.jar
 
  When I start my Solr server from apache-solr-3.3.0\example folder:
  java -jar start.jar
 
  I get the following errors:
 
  SEVERE: org.apache.solr.common.SolrException: Error loading class
  'solr.ICUTokenizerFactory'
 
  SEVERE: org.apache.solr.common.SolrException: analyzer without class or
  tokenizer  filter list
 
  SEVERE: org.apache.solr.common.SolrException: Unknown fieldtype
 'text_icu'
  specified on field subject
 
  I tried adding various other jar files to the lib folder but it does not
  help.
 
  What am I doing wrong?
 
  Satish
 



 --
 lucidimagination.com