Re: Solr Cores

2012-01-29 Thread Ranveer Kumar
How much query per second a single core can handle in this case..

regards

On Wed, Jan 25, 2012 at 9:49 AM, Sujatha Arun suja.a...@gmail.com wrote:

 Thanks Erick.

 Regards
 Sujatha

 On Mon, Jan 23, 2012 at 11:16 PM, Erick Erickson erickerick...@gmail.com
 wrote:

  You can have a large number of cores, so people have multiple
  hundreds. Having multiple cores is preferred over having
  multiple JVMs since it's more efficient at sharing system
  resources. If you're running a 32 bit JVM, you are limited in
  the amount of memory you can let the JVM use, so that's a
  consideration, but otherwise use multiple cores in one JVM
  and give that JVM say, half of the physical memory on the
  machine and tune from there.
 
  Best
  Erick
 
  On Sun, Jan 22, 2012 at 8:16 PM, Sujatha Arun suja.a...@gmail.com
 wrote:
   Hello,
  
   We have in production a number of individual solr Instnaces on a single
   JVM.As a result ,we see that the permgenSpace keeps increasing with
 each
   additional instance added.
  
   I would Like to know ,if we can have solr cores , instead of individual
   instances.
  
  
 - Is there any limit to the number of cores ,for a single instance?
 - Will this decrease the permgen space as the LIB is shared.?
 - Would there be any decrease in performance with number of cores
  added?
 - Any thing else that I should know before moving into cores?
  
  
   Any help would be appreciated?
  
   Regards
   Sujatha
 



Re: CLOSE_WAIT after connecting to multiple shards from a primary shard

2012-01-23 Thread Ranveer

Hi Mukund,

Since I am getting this issue for long time, I had done some hit and 
run. In my case I am connecting the local tomcat server using solrJ. 
SolrJ has max connection perhost 20 and per client 2. As I have heavy 
load and lots of dependency on solr so it seems very low. To increase 
the default perhost and per client connetions I done:


MultiThreadedHttpConnectionManager connectionManager=new 
MultiThreadedHttpConnectionManager();
DefaultHttpMethodRetryHandler retryhandler = new 
DefaultHttpMethodRetryHandler(0, false);

connectionManager.getParams().setMaxTotalConnections(500);

connectionManager.getParams().setDefaultMaxConnectionsPerHost(500);

connectionManager.closeIdleConnections(0L);


connectionManager.getParams().setMaxTotalConnections(500);

connectionManager.getParams().setDefaultMaxConnectionsPerHost(500);

connectionManager.closeIdleConnections(0L);
HttpClient httpClient=new HttpClient(connectionManager);


httpClient.getHttpConnectionManager().getParams().setDefaultMaxConnectionsPerHost(500);

httpClient.getHttpConnectionManager().getParams().setMaxTotalConnections(500);

httpClient.getParams().setParameter(http.method.retry-handler, 
retryhandler);


server=new CommonsHttpSolrServer(getSolrURL(), httpClient);

I have 5 cores setup and I am using above code for each core in static 
block and using same instance across all the class.
but it not seems any effect. still server die randomly in 1 to 2 days. I 
am using Tomcat instead of jetty. I already increase maxThread in tomcat 
to 500 Is there any limitation of tomcat for this much stress. But other 
end when I look using telnet there is not much thread is open. I have 
doubt in httpclient.


any help..

regards




On Tuesday 24 January 2012 07:27 AM, Mukunda Madhava wrote:

Hi Ranveer,
I dont have any solution to this problem. I havent got any response 
from the forums as well.


I implemented custom design for distributed searching, as it gave me 
better control on the connections open.


On Sun, Jan 22, 2012 at 10:05 PM, Ranveer Kumar 
ranveer.s...@gmail.com mailto:ranveer.s...@gmail.com wrote:



Hi Mukunda,

Did you get solution. Actually I am aslo getting same problem.
Please help me to over come this problem.

regards
Ranveer

On Thu, Jun 2, 2011 at 12:37 AM, Mukunda Madhava
mukunda...@gmail.com mailto:mukunda...@gmail.com wrote:

Hi Otis,
Sending to solr-user mailing list.

We see this CLOSE_WAIT connections even when i do a simple
http request via
curl, that is, even when i do a simple curl using a primary
and secondary
shard query, like for e.g.

curl 

http://primaryshardhost:8180/solr/core0/select?q=*%3A*shards=secondaryshardhost1:8090/solr/appgroup1_11053000_11053100

http://primaryshardhost:8180/solr/core0/select?q=*%3A*shards=secondaryshardhost1:8090/solr/appgroup1_11053000_11053100


While fetching data it is in ESTABLISHED state

-sh-3.2$ netstat | grep ESTABLISHED | grep 8090
tcp0  0 primaryshardhost:36805
secondaryshardhost1:8090
ESTABLISHED

After the request has come back, it is in CLOSE_WAIT state

-sh-3.2$ netstat | grep CLOSE_WAIT | grep 8090
tcp1  0 primaryshardhost:36805
secondaryshardhost1:8090
CLOSE_WAIT

why does Solr keep the connection to the shards in CLOSE_WAIT?

Is this a feature of Solr? If we modify an OS property (I dont
know how) to
cleanup the CLOSE_WAITs will it cause an issue with subsequent
searches?

Can someone help me please?

thanks,
Mukunda

On Mon, May 30, 2011 at 5:59 PM, Otis Gospodnetic 
otis_gospodne...@yahoo.com
mailto:otis_gospodne...@yahoo.com wrote:

 Hi,

 A few things:
 1) why not send this to the Solr list?
 2) you talk about searching, but the code sample is about
optimizing the
 index.

 3) I don't have SolrJ API in front of me, but isn't there is
 CommonsSolrServe
 ctor that takes in a URL instead of HttpClient instance?
 Try that one.

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



 - Original Message 
  From: Mukunda Madhava mukunda...@gmail.com
mailto:mukunda...@gmail.com
  To: gene...@lucene.apache.org
mailto:gene...@lucene.apache.org
  Sent: Mon, May 30, 2011 1:54:07 PM
  Subject: CLOSE_WAIT after connecting to multiple shards
from a primary
 shard
 
  Hi,
  We are having

Re: Too many connections in CLOSE_WAIT state on master solr server

2012-01-09 Thread Ranveer

Hi,

I am facing same problem. Did  -Dhttp.maxConnections resolve the problem ?

Please let us know!

regards
Ranveer


On Thursday 15 December 2011 11:30 AM, samarth s wrote:

Thanks Erick and Mikhail. I'll try this out.

On Wed, Dec 14, 2011 at 7:11 PM, Erick Ericksonerickerick...@gmail.com  wrote:

I'm guessing (and it's just a guess) that what's happening is that
the container is queueing up your requests while waiting
for the other connections to close, so Mikhail's suggestion
seems like a good idea.

Best
Erick

On Wed, Dec 14, 2011 at 12:28 AM, samarth s
samarth.s.seksa...@gmail.com  wrote:

The updates to the master are user driven, and are needed to be
visible quickly. Hence, the high frequency of replication. It may be
that too many replication requests are being handled at a time, but
why should that result in half closed connections?

On Wed, Dec 14, 2011 at 2:47 AM, Erick Ericksonerickerick...@gmail.com  wrote:

Replicating 40 cores every 20 seconds is just *asking* for trouble.
How often do your cores change on the master? How big are
they? Is there any chance you just have too many cores replicating
at once?

Best
Erick

On Tue, Dec 13, 2011 at 3:52 PM, Mikhail Khludnev
mkhlud...@griddynamics.com  wrote:

You can try to reuse your connections (prevent them from closing) by
specifying  
-Dhttp.maxConnections=http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.htmlN
in jvm startup params. At client JVM!. Number should be chosen considering
the number of connection you'd like to keep alive.

Let me know if it works for you.

On Tue, Dec 13, 2011 at 2:57 PM, samarth ssamarth.s.seksa...@gmail.comwrote:


Hi,

I am using solr replication and am experiencing a lot of connections
in the state CLOSE_WAIT at the master solr server. These disappear
after a while, but till then the master solr stops responding.

There are about 130 open connections on the master server with the
client as the slave m/c and all are in the state CLOSE_WAIT. Also, the
client port specified on the master solr server netstat results is not
visible in the netstat results on the client (slave solr) m/c.

Following is my environment:
- 40 cores in the master solr on m/c 1
- 40 cores in the slave solr on m/c 2
- The replication poll interval is 20 seconds.
- Replication part in solrconfig.xml in the slave solr:
requestHandler name=/replication class=solr.ReplicationHandler
   lst name=slave

   !--fully qualified url for the replication handler
of master--
   str name=masterUrl$mastercorename/replication/str

   !--Interval in which the slave should poll master
.Format is HH:mm:ss . If this is absent slave does not poll
automatically.
But a fetchindex can be triggered from
the admin or the http API--
   str name=pollInterval00:00:20/str
   !-- The following values are used when the slave
connects to the master to download the index files.
   Default values implicitly set as 5000ms
and 1ms respectively. The user DOES NOT need to specify
   these unless the bandwidth is extremely
low or if there is an extremely high latency--
   str name=httpConnTimeout5000/str
   str name=httpReadTimeout1/str
  /lst
   /requestHandler

Thanks for any pointers.

--
Regards,
Samarth




--
Sincerely yours
Mikhail Khludnev
Developer
Grid Dynamics
tel. 1-415-738-8644
Skype: mkhludnev
http://www.griddynamics.com
  mkhlud...@griddynamics.com



--
Regards,
Samarth







Re: field value getting null with special char

2011-09-27 Thread Ranveer

Hi Erick,

I am using SolrQuery.setFields and following are my code :

query.setParam(fq, type:Livescore);
query.addSortField(last_updated, ORDER.desc);
query.setRows(5);

I think solr is connecting to server because with same query I am 
getting field value other than special char field value.


regards
Ranveer

On Sunday 25 September 2011 12:11 AM, Erick Erickson wrote:

I can't imagine that the ( or ) is a problem. So I think we need to see
how you're using SolrJ. In particular, are you asking for the
field in question to be returned (e.g. SolrQuery.setFields or addField)?

Second question: Are you sure your SolrJ is connecting to the server you
connect to with the browser? You should see activity in the logs for both
cases.

Best
Erick

On Tue, Sep 20, 2011 at 6:23 PM, Ranveer Kumarranveer.s...@gmail.com  wrote:

Is any help.. I am unable to figure out..
On 20-Sep-2011 2:22 PM, Ranveerranveer.s...@gmail.com  wrote:

Hi All,

I am facing problem to get value from solr server for a particular field.
My environment is :
Red hat 5.3
Solr 3.3
Jdk 1.6.24
Tomcat 6.2x
Fetching value using SolrJ

When using *:* on browser it show but when using solrj all value coming
except few fields those have special char.

str name=fetch_value1Scoring (TEST)/str
str name=fetch_value2Scoring rate 3/4 (5)/str

above value coming on browser but getting blank in solrj. I also noticed
that all field with '(' or ')' have this kind of problem.

If this is related to '(' then how to skip special char so can get value
in solrj.

regards
Ranveer







field value getting null with special char

2011-09-20 Thread Ranveer

Hi All,

I am facing problem to get value from solr server for a particular field.
My environment is :
Red hat 5.3
Solr 3.3
Jdk 1.6.24
Tomcat 6.2x
Fetching value using SolrJ

When using *:* on browser it show but when using solrj all value coming 
except few fields those have special char.


str name=fetch_value1Scoring (TEST)/str
str name=fetch_value2Scoring rate 3/4 (5)/str

above value coming on browser but getting blank in solrj. I also noticed 
that all field with '(' or ')' have this kind of problem.


If this is related to '(' then how to skip special char so can get value 
in solrj.


regards
Ranveer





Re: field value getting null with special char

2011-09-20 Thread Ranveer Kumar
Is any help.. I am unable to figure out..
On 20-Sep-2011 2:22 PM, Ranveer ranveer.s...@gmail.com wrote:
 Hi All,

 I am facing problem to get value from solr server for a particular field.
 My environment is :
 Red hat 5.3
 Solr 3.3
 Jdk 1.6.24
 Tomcat 6.2x
 Fetching value using SolrJ

 When using *:* on browser it show but when using solrj all value coming
 except few fields those have special char.

 str name=fetch_value1Scoring (TEST)/str
 str name=fetch_value2Scoring rate 3/4 (5)/str

 above value coming on browser but getting blank in solrj. I also noticed
 that all field with '(' or ')' have this kind of problem.

 If this is related to '(' then how to skip special char so can get value
 in solrj.

 regards
 Ranveer





Re: category tree navigation with the help of solr

2011-09-05 Thread Ranveer

Hi Priti,

You can do this by adding an extra field (string type) for facet on 
which you need to send query.


1.One product can belong to more than one categories.

You can put internal flag for that category at index time, and at the time of 
query you can send that flag to query.

More of less same thing I am doing in www.jagranjosh.com and videos.jagran.com

regards
Ranveer



On Monday 05 Septyember 2011 01:09 PM, Tony Qiu wrote:

Dear Gupta,

In my case, I am doing something similar to you.
I use tow core, one core I build category's tree, another core I use to
build the product's information include the leaf cat of products. So when
one search I get, I will facet the leaf cat, then get the category tree in
the category core via product's leafcat (or you can cache the category tree
in you memery).

Hope this can help u.

2011/9/5 Priti Guptapgupt...@sapient.com


Hi,

We are using solr in our ecommerce application.we are indexing on different
attributes of products.
We want to create category tree with the help of solr.

There are following points about catgory and products to be considered,
1.One product can belong to more than one categories.
2.category is a hierarchical facet.
3.More than one categories can share same name.

It would be a great help if someone can suggest a way to index and query
data based on the above architecture.

Thanks,
Priti





not equals query in solr

2011-08-24 Thread Ranveer Kumar
Hi All,

How to do negative query in solr. Following are the criteria :
I have state and city field where I want to filter only those state and city
which is not blank. something like: state NOT  AND city NOT .
I tried -state: but its not working.

Or suggest  me to do this in better way..

regards
Ranveer


Re: not equals query in solr

2011-08-24 Thread Ranveer Kumar
Hi,

is it right way to do :
q=(state:[* TO *] AND city:[* TO *])

regards
Ranveer

On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar ranveer.s...@gmail.comwrote:

 Hi All,

 How to do negative query in solr. Following are the criteria :
 I have state and city field where I want to filter only those state and
 city which is not blank. something like: state NOT  AND city NOT .
 I tried -state: but its not working.

 Or suggest  me to do this in better way..

 regards
 Ranveer






Re: not equals query in solr

2011-08-24 Thread Ranveer Kumar
any help...

On Wed, Aug 24, 2011 at 12:58 PM, Ranveer Kumar ranveer.s...@gmail.comwrote:

 Hi,

 is it right way to do :
 q=(state:[* TO *] AND city:[* TO *])

 regards
 Ranveer


 On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar ranveer.s...@gmail.comwrote:

 Hi All,

 How to do negative query in solr. Following are the criteria :
 I have state and city field where I want to filter only those state and
 city which is not blank. something like: state NOT  AND city NOT .
 I tried -state: but its not working.

 Or suggest  me to do this in better way..

 regards
 Ranveer







how to get row no. of current record

2011-08-02 Thread Ranveer

Hi,

How to know the row number of current record.

i.e : suppose we have 10 million record indexed. Currently I am on 
5th records and id of the this record is XYZ00234, how to know that 
the current record rows no is 5th.


thanks..

regards
Ranveer



Re: how to get row no. of current record

2011-08-02 Thread Ranveer

any help..

On Tuesday 02 August 2011 11:22 PM, Ranveer wrote:

Hi,

How to know the row number of current record.

i.e : suppose we have 10 million record indexed. Currently I am on 
5th records and id of the this record is XYZ00234, how to know 
that the current record rows no is 5th.


thanks..






Re: how to get row no. of current record

2011-08-02 Thread Ranveer

Hi Anshum,

Thanks for reply.

My requirement is to get result start from current id. For this I need 
to set start rows.
I am looking something like Jonty's post : 
http://lucene.472066.n3.nabble.com/previous-and-next-rows-of-current-record-td3187935.html


thanks
Ranveer



On Wednesday 03 August 2011 08:31 AM, Anshum wrote:

Hi Ranveer,
I'm not really sure if you mean lucene's docid (as that's the auto 
increment id used in here). Why would you need that in the first 
place? I'd suggest you not to expose that. Let me know in case you 
wanted something else. Also, perhaps you could explain the exact 
usecase and one of us give you a better solution.

Hope that helps.
--
Anshum Gupta
http://ai-cafe.blogspot.com


On Tue, Aug 2, 2011 at 11:22 PM, Ranveer ranveer.s...@gmail.com 
mailto:ranveer.s...@gmail.com wrote:


Hi,

How to know the row number of current record.

i.e : suppose we have 10 million record indexed. Currently I am on
5th records and id of the this record is XYZ00234, how to know
that the current record rows no is 5th.

thanks..

regards
Ranveer






Re: Announcement/Invitation: Melbourne Solr/Lucene Users Group

2011-07-20 Thread Ranveer Kumar
Hi,

I m intrested to atained but not in aus.:-(

Regards
 On 21-Jul-2011 9:45 AM, Dave Hall dave.h...@skwashd.com wrote:
 Hi Tal,

 On 21/07/11 14:04, Tal Rotbart wrote:
 We have noticed that there is a blossoming of Apache Solr/Lucene usage
  development in Melbourne in addition to a lack of an unofficial,
 relaxed gathering to allow some fruitful information and experience
 exchange.

 We're trying to put together a laid back meet up for developers (and
 other interested people) who are currently using Apache Solr (and/or
 Lucene) or would like to learn more about it. Aiming for it to be a
 high signal/noise ratio group, with meet ups probably once every two
 months.

 This sounds great! I'm not sure I'll be a regular, but if I'm around
 town when it is on I will try to drop in.

 The first meet up is still TBD, but please join the group if you're
 keen to join us for pizza, beer, and a discussion about Solr once we
 figure out the date of the first meeting.
 Once a date is decided please update the Melbourne *UG wiki page so
 others can find out about it. The wiki has meeting times for various
 user groups around town, which might help you find a time which doesn't
 clash with other groups. Check out at http://perl.net.au/wiki/Melbourne

 Cheers

 Dave


Re: commit time and lock

2011-06-22 Thread Ranveer

Dear all,

Kindly help me..

thanks

On Tuesday 21 June 2011 11:46 AM, Jonty Rhods wrote:

I am using solrj to index the data. I have around 5 docs indexed. As at
the time of commit due to lock server stop giving response so I was
calculating commit time:

double starttemp = System.currentTimeMillis();
server.add(docs);
server.commit();
System.out.println(total time in commit =  + (System.currentTimeMillis() -
starttemp)/1000);

It taking around 9 second to commit the 5000 docs with 15 fields. However I
am not confirm the lock time of index whether it is start
since server.add(docs); time or server.commit(); time only.

If I am changing from above to following

server.add(docs);
double starttemp = System.currentTimeMillis();
server.commit();
System.out.println(total time in commit =  + (System.currentTimeMillis() -
starttemp)/1000);

then commit time becomes less then 1 second. I am not sure which one is
right.

please help.

regards
Jonty





Re: query about the server configuration

2011-06-20 Thread Ranveer

thanks..

However I am still not clear about that How can I achieve the requirement:

1. I have around 1 file to index daily.
2. I need to index in every 5 minutes
3. size of the files are 50mb per day
4. 10 to 20 concurrent users

please help..

regards

On Monday 20 June 2011 06:07 PM, Erick Erickson wrote:

 From Ahmet Arslan's email to Ranveer:


It uses HttpClient under the hood. You can pass httpClient to its
constructor too. It seems that MultiThreadedHttpConnectionManager has
setMaxConnectionsPerHost method.

String serverPath = http://localhost:8983/solr;;
HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
URL url = new URL(serverPath);
CommonsHttpSolrServer solrServer = new CommonsHttpSolrServer(url, client);

Best
Erick

On Sun, Jun 19, 2011 at 9:45 PM, Jonty Rhodsjonty.rh...@gmail.com  wrote:

I forgot an important point that I need to commit the server in 2 to 5
minutes..

please help..

regards


On Sun, Jun 19, 2011 at 11:29 PM, Ranveerranveer.s...@gmail.com  wrote:


Please help I am also in same situation.

regards



On Sunday 19 June 2011 12:59 PM, Jonty Rhods wrote:


Dear all,

I am quite new and not work on solr for heavy request.

I have following server configuration:

16GB RAM
16 CPU

I need to index update in every minutes and at least more than 5000 docs
per
day. Size of the data per day will be around 50 MB. I am expecting 10 to
30 concurrent hit on server which is 2 million hits per day and around 30
to
40 concurrent user at peak our.

Right now I had configure core and using static method to call solr server
in solrj (SolrServer server = new HttpSolrServer();). I am worried that at
peak our static instance of the server in solrj will not able to perform
the
response and it will become slow.

Is there any way to open more then one connection of server instance in
the
SolrJ like connection pool which we are using in Database related
connection
pooling (Apache DBCP or Hibernate).

Please help me to configure the server as my heavy requirements.

thanks for your help.

regards
jonty






Re: query about the server configuration

2011-06-19 Thread Ranveer

Please help I am also in same situation.

regards


On Sunday 19 June 2011 12:59 PM, Jonty Rhods wrote:

Dear all,

I am quite new and not work on solr for heavy request.

I have following server configuration:

16GB RAM
16 CPU

I need to index update in every minutes and at least more than 5000 docs per
day. Size of the data per day will be around 50 MB. I am expecting 10 to
30 concurrent hit on server which is 2 million hits per day and around 30 to
40 concurrent user at peak our.

Right now I had configure core and using static method to call solr server
in solrj (SolrServer server = new HttpSolrServer();). I am worried that at
peak our static instance of the server in solrj will not able to perform the
response and it will become slow.

Is there any way to open more then one connection of server instance in the
SolrJ like connection pool which we are using in Database related connection
pooling (Apache DBCP or Hibernate).

Please help me to configure the server as my heavy requirements.

thanks for your help.

regards
jonty





Re: about the SolrServer server = new CommonsHttpSolrServer(URL);

2011-06-19 Thread Ranveer

thanks..
however few more query.
How to maintain connections threads (max and min settings)?
What would be ideal setting for max in setMaxConnectionsPerHost method. 
Will it be ok for 30 to 40 concurrent user. How thread will be maintain for


MultiThreadedHttpConnectionManager class.



On Sunday 19 June 2011 02:04 PM, Ahmet Arslan wrote:

for heavy use (30 to 40 concurrent
user) will it work.
How to open and maintain more connection at a time like
connection pool. So
user cat receive fast response..

It uses HttpClient under the hood. You can pass httpClient to its constructor 
too. It seems that MultiThreadedHttpConnectionManager has 
setMaxConnectionsPerHost method.

String serverPath = http://localhost:8983/solr;;
HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
URL url = new URL(serverPath);
CommonsHttpSolrServer solrServer = new CommonsHttpSolrServer(url, client);




about the SolrServer server = new CommonsHttpSolrServer(URL);

2011-06-17 Thread Ranveer

Dear all,

I am using

SolrServer server =  new CommonsHttpSolrServer(URL);

through out the class. How can I improve the connection, in my case: 
should I need to close the server after fetching the result or 
CommonsHttpSolrServer(URL); will maintain at their end. There is other 
way: I can make this as static and can use through out the classes.


please suggest..

regards



Re: scheduling imports and heartbeats

2010-11-09 Thread Ranveer Kumar
You should use cron for that..

On 10 Nov 2010 08:47, Tri Nguyen tringuye...@yahoo.com wrote:

Hi,

Can I configure solr to schedule imports at a specified time (say once a
day,
once an hour, etc)?

Also, does solr have some sort of heartbeat mechanism?

Thanks,

Tri


Re: SolrJ Response + JSON

2010-07-29 Thread Ranveer
Rajani is right you can get response by passing wt=json. But I think if 
you want to use solrj then
you will require to parse binary format data in json format or you can 
use third party json parser.


regards
Ranveer
http://www.onlymyhealth.com

On Thursday 29 July 2010 09:55 AM, rajini maski wrote:

Yeah right... This query will do it

http://localhost:8090/solr/select/?q=*:*version=2.2start=0rows=10indent=onwt=json

This will do your work... This is more liike using xsl transformation
supported by solr..:)

Regards,
Rajani Maski


On Wed, Jul 28, 2010 at 6:24 PM, Mark Allanmark.al...@ed.ac.uk  wrote:

   

I think you should just be able to addwt=json to the end of your query
(or change whatever the existing wt parameter is in your URL).

Mark


On 28 Jul 2010, at 12:54 pm, MitchK wrote:


 

Hello community,

I need to transform SolrJ - responses into JSON, after some computing on
those results by another application has finished.

I can not do those computations on the Solr - side.

So, I really have to translate SolrJ's output into JSON.

Any experiences how to do so without writing your own JSON-writer?

Thank you.
- Mitch
--
View this message in context:
http://lucene.472066.n3.nabble.com/SolrJ-Response-JSON-tp1002024p1002024.html
Sent from the Solr - User mailing list archive at Nabble.com.


   

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


 
   




Re: display solr result in JSP

2010-07-28 Thread Ranveer

Hi,

very simple to display value in jsp. if you are using solrj then simply 
store value in bean from java class and can display.
same thing you can do in servlet too.. get the solr server response and 
return in bean or can display directly(in servlet).

hope you will able to do.

regards
Ranveer

On Wednesday 28 July 2010 08:11 PM, Ma, Xiaohui (NIH/NLM/LHC) [C] wrote:

I am new for solr. Just got example xml file index and search by following solr 
tutorial. I wonder how I can get the search result display in a JSP. I really 
appreciate any suggestions you can give.

Thanks so much,
Xiaohui

   




Re: simple question from a newbie

2010-07-28 Thread Ranveer
I think you using wild-card search or should use wild-card search. but 
first of all please provide the schema and configuration file for more 
details.


regards
Ranveer


On Wednesday 28 July 2010 07:51 PM, Nguyen, Vincent (CDC/OSELS/NCPHI) 
(CTR) wrote:

Hi,



I'm new to Solr and have a rather dumb question.  I want to do a query
that returns all the Titles that start with a certain letter.  For
example



I have these titles:

Results of in-mine research in support

Cancer Reports

State injury indicators report

Cancer Reports

Indexed dermal bibliography

Childhood agricultural-related injury report

Childhood agricultural injury prevention





I want the query to return:

Cancer Reports

Cancer Reports

Childhood agricultural-related injury report

Childhood agricultural injury prevention



I want something like dc.title=c* type query



I know that I can facet by dc.title and then use the parameter
facet.prefix=c but it returns something like this:

Cancer Reports [2]

Childhood agricultural-related injury report [1]

Childhood agricultural injury prevention [1]





Vincent Vu Nguyen
Division of Science Quality and Translation

Office of the Associate Director for Science
Centers for Disease Control and Prevention (CDC)
404-498-6154
Century Bldg 2400
Atlanta, GA 30329




   




Re: logic for auto-index

2010-06-02 Thread Ranveer

Hi Peter,

actually I want the index process should start automatically. right now 
I am doing mannually.
same thing I want to start indexing when less load on server i.e. late 
night. So setting auto will fix my

problem..


On Wednesday 02 June 2010 02:00 PM, Peter Karich wrote:

Hi Jonty,

what is your specific problem?
You could use a cronjob or the Java-lib called quartz to automate this task.
Or did you mean replication?

Regards,
Peter.

   

Hi All,

I am very new to solr as well as java too.
I require to use solrj for indexing also require to index automatically once
in 24 hour.
I wrote java code for indexing now I want to do further coding for automatic
process.
Could you suggest or give me sample code for automatic index process..
please help..

with regards
Jonty.

 




max no of column in schema

2010-05-04 Thread Ranveer

Hi,

How many column can we defined in schema.
I have already around 100 column in schema..

thanks


Re: require synonym filter on string field

2010-04-29 Thread Ranveer

On 4/29/10 3:45 PM, Koji Sekiguchi wrote:

Ranveer Kumar wrote:

Hi,

I require to configure synonym to exact match.
The field I need to search is string type. I tried to configure by 
the text

but in text, due to whitespace tokenizer exact match not found.
My requirement is :
suppose user search by solr user and exact solr user (or equivalant
synonym) are available then only return result..
my fieldType is string and I want to configure synonym on string 
field.


or
Is there any other way to index without tokenize (as it is) string and
configure synonym for that field?

please help..


Why don't you use KeywordTokenizer? And if you want to
treat text in synonyms.txt as string as well,  set tokenizerFactory
attribute to KeywordTokenizerFactory.

Koji


Hi Koji,
thanks for reply.
where should I use the KeywordTokenizerFactory in string or in text field.

I am wondering that KeywordTokenizerFactory will work or not in 
textfield. Actually as I understood about the KeywordTokenizerFactory 
that : KeywordTokenizerFactory is tokenize the keyword.
 for example : 'solr user' will tokenize to 'solr' and 'user' because 
solr and user are keyword.. My requirement is to index as 'solr user'




synonym filter problem for string or phrase

2010-04-29 Thread Ranveer

Hi,

I am trying to configure synonym filter.
my requirement is:
when user searching by phrase like what is solr user? then it should 
be replace with solr user.

something like : what is solr user? = solr user

My schema for particular field is:

fieldType name=text_sync class=solr.TextField 
positionIncrementGap=100

analyzer type=index
tokenizer class=solr.KeywordTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/

/analyzer
analyzer type=query
tokenizer class=solr.KeywordTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.TrimFilterFactory /
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt 
ignoreCase=true expand=true tokenizerFactory=KeywordTokenizerFactory/

/analyzer
/fieldType

it seems working fine while trying by analysis.jsp but not by url
http://localhost:8080/solr/core0/select?q=what is solr user?
or
http://localhost:8080/solr/core0/select?q=what is solr user?

Please guide me for achieve desire result.



Re: synonym filter problem for string or phrase

2010-04-29 Thread Ranveer

On 4/29/10 8:50 PM, Marco Martinez wrote:

Hi Ranveer,

If you don't specify a field type in the q parameter, the search will be
done searching in your default search field defined in the solrconfig.xml,
its your default field a text_sync field?

Regards,

Marco Martínez Bautista
http://www.paradigmatecnologico.com
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón
Tel.: 91 352 59 42


2010/4/29 Ranveerranveer.s...@gmail.com

   

Hi,

I am trying to configure synonym filter.
my requirement is:
when user searching by phrase like what is solr user? then it should be
replace with solr user.
something like : what is solr user? =  solr user

My schema for particular field is:

fieldType name=text_sync class=solr.TextField
positionIncrementGap=100
analyzer type=index
tokenizer class=solr.KeywordTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/

/analyzer
analyzer type=query
tokenizer class=solr.KeywordTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.TrimFilterFactory /
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true tokenizerFactory=KeywordTokenizerFactory/
/analyzer
/fieldType

it seems working fine while trying by analysis.jsp but not by url
http://localhost:8080/solr/core0/select?q=what is solr user?
or
http://localhost:8080/solr/core0/select?q=what is solr user?

Please guide me for achieve desire result.


 
   

Hi Marco,
thanks.
yes my default search field is text_sync.
I am getting result now but not as I expect.
following is my synonym.txt

what is bone cancer=bone cancer
what is bone cancer?=bone cancer
what is of bone cancer=bone cancer
what is symptom of bone cancer=bone cancer
what is symptoms of bone cancer=bone cancer

in above I am getting result of all synonym but not the last one what 
is symptoms of bone cancer=bone cancer.
I think due to stemming I am not getting expected result. However when I 
am checking result from the analysis.jsp,

its giving expected result. I am confused..
Also I want to know best approach to configure synonym for my requirement.

thanks
with regards


Re: Facet count problem

2010-04-18 Thread Ranveer Kumar
I am.using text for type, which is static. For example: type is a field and
I am using type for categorization. For news type I am using news and for
blog using blog.. type is a text field.

On Apr 17, 2010 8:38 PM, Ahmet Arslan iori...@yahoo.com wrote:

 I am facing problem to get facet result count. I must be  wrong
somewhere.  I am getting proper ...
Are you faceting on a tokenized field? What is the fieldType of your field?


Re: Facet count problem

2010-04-18 Thread Ranveer Kumar
Hi Erick,

My schema configuration is following.


 fieldType name=text class=solr.TextField positionIncrementGap=100
  analyzer type=index
charFilter class=solr.HTMLStripCharFilterFactory/
tokenizer class=solr.HTMLStripWhitespaceTokenizerFactory/
!--tokenizer class=solr.WhitespaceTokenizerFactory/--
!-- in this example, we will only use synonyms at query time
filter class=solr.SynonymFilterFactory
synonyms=index_synonyms.txt ignoreCase=true expand=false/
--
!-- Case insensitive stop word removal.
  add enablePositionIncrements=true in both the index and query
  analyzers to leave a 'gap' for more accurate phrase queries.
--
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
  /analyzer
  analyzer type=query
  charFilter class=solr.HTMLStripCharFilterFactory/!--
escapedTags=lt;,gt;/  --
  tokenizer class=solr.HTMLStripWhitespaceTokenizerFactory/
!--tokenizer class=solr.WhitespaceTokenizerFactory/--
!--tokenizer class=solr.HTMLStripStandardTokenizerFactory/--

   !--  filter class=solr.LengthFilterFactory min=2 max=50 /
--
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
  /analyzer
/fieldType


field name=type type=text indexed=true stored=true/

!-- copy field for default search--
 copyField source=type dest=text/





On Mon, Apr 19, 2010 at 6:22 AM, Erick Erickson erickerick...@gmail.comwrote:

 Can we see the actual field definitions from your schema file.
 Ahmet's question is vital and is best answered if you'll
 copy/paste the relevant configuration entries But based
 on what you *have* posted, I'd guess you're trying to
 facet on tokenized fields, which is not recommended.

 You might take a look at:
 http://wiki.apache.org/solr/UsingMailingLists, it'll help you
 frame your questions in a manner that gets you your
 answers as fast as possibld.

 Best
 Erick

 On Sun, Apr 18, 2010 at 12:59 PM, Ranveer Kumar ranveer.s...@gmail.com
 wrote:

  I am.using text for type, which is static. For example: type is a field
 and
  I am using type for categorization. For news type I am using news and for
  blog using blog.. type is a text field.
 
  On Apr 17, 2010 8:38 PM, Ahmet Arslan iori...@yahoo.com wrote:
 
   I am facing problem to get facet result count. I must be  wrong
  somewhere.  I am getting proper ...
  Are you faceting on a tokenized field? What is the fieldType of your
 field?
 



Re: HTMLStripCharFilterFactory configuration problem

2010-04-17 Thread Ranveer Kumar
Hi Sven,

Thanks for reply..
but how will I get the stored value instead of indexed value..
where I need to configure to get stored instead of indexed value.
please help...

thanks
with regards


On Wed, Apr 14, 2010 at 3:16 PM, Sven Maurmann sven.maurm...@kippdata.dewrote:

 Hi,

 please note that you get the stored value of the field as a result and
 not the indexed one.

 Cheers,
   Sven


 --On Wednesday, April 14, 2010 02:54:52 PM +0530 Ranveer Kumar 
 ranveer.s...@gmail.com wrote:

  Hi all,

 I am facing problem to configure HTMLStripCharFilterFactory.
 following is the schema :
   fieldType name=text class=solr.TextField
 positionIncrementGap=100   analyzer type=index
 charFilter class=solr.HTMLStripCharFilterFactory/
tokenizer class=solr.WhitespaceTokenizerFactory/

filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
 generateWordParts=1 generateNumberParts=1 catenateWords=1
 catenateNumbers=1 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory
 language=English protected=protwords.txt/
  /analyzer
  analyzer type=query
  charFilter class=solr.HTMLStripCharFilterFactory/!--
 escapedTags=lt;,gt;/  --
tokenizer class=solr.WhitespaceTokenizerFactory/

   !--  filter class=solr.LengthFilterFactory min=2 max=50
 / -- filter class=solr.SynonymFilterFactory
 synonyms=synonyms.txt ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
 generateWordParts=1 generateNumberParts=1 catenateWords=0
 catenateNumbers=0 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory
 language=English protected=protwords.txt/
  /analyzer
/fieldType

 when I am checking with analysis.jsp it giving true result. But in
 my query result still I am getting html tage..
 I am using solrj client..

 please help me




 --
 kippdata informationstechnologie GmbH
 Sven Maurmann   Tel: 0228 98549 -12
 Bornheimer Str. 33a Fax: 0228 98549 -50
 D-53111 Bonnsven.maurm...@kippdata.de

 HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
 Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann



Facet count problem

2010-04-17 Thread Ranveer Kumar
Hi,

I am facing problem to get facet result count. I must be wrong somewhere.
I am getting proper result count when searching by single word, but when
searching by string then result count become wrong.

for example : -
search keyword : Bagdad bomb blast.
I am getting 5 result count for facet country. but when clicking on the
facet browser actual value is more then 5.
When searching by bagdad then result count is fine.

when using url to check the response for string

http://localhost:8080/solr/core0/select?q=bagdad bomb
blastfacet=onfacet.field=typefq=type:news

it giving the result count 8 which is right.

I am using solrj client. following is my code:-


   query.setFacet(true);
// query.addFacetQuery(type:+)
query.addFacetField(type);
query.addFacetQuery(qq);
query.setFacetSort(index);

   ListFacetField listFacet = rsp.getFacetFields();

IteratorFacetField itr = listFacet.iterator();
log.info(listFacet.size());
for (int i = 0; i  listFacet.size(); i++) {
FacetField facetField = itr.next();
ListFacetField.Count fList = facetField.getValues();
if (fList == null) {
break;
}
log.info(fList.size());
IteratorFacetField.Count flistItr = fList.iterator();
for (int j = 0; j  fList.size(); j++) {
FacetField.Count ff = flistItr.next();
labelValueBean = new LabelValueBean();

labelValueBean.setLabel(ff.getName());
labelValueBean.setValue(Long.toString(ff.getCount()));
log.info(ff.getName() + : + ff.getCount());
listLabelValueBean.add(labelValueBean);

}

}


please help..

thanks
with regards


Re: HTMLStripCharFilterFactory configuration problem

2010-04-17 Thread Ranveer Kumar
thanks..

Actually I am using SolrJ client..
Is there anyway to do same using solrj.

thanks

On Sat, Apr 17, 2010 at 8:06 PM, Ahmet Arslan iori...@yahoo.com wrote:



  Thanks for reply..
  but how will I get the stored value instead of indexed
  value..
  where I need to configure to get stored instead of indexed
  value.
  please help...
 

 You need to remove html tags before analysis (charfilter, tokenizer,
 tokenfilter) phase. For example if you are using DIH to index, you can use
 HTMLStripTransformer[1]. How are you indexing your data?

 [1]http://wiki.apache.org/solr/DataImportHandler#HTMLStripTransformer






HTMLStripCharFilterFactory configuration problem

2010-04-14 Thread Ranveer Kumar
Hi all,

I am facing problem to configure HTMLStripCharFilterFactory.
following is the schema :
   fieldType name=text class=solr.TextField positionIncrementGap=100
  analyzer type=index
charFilter class=solr.HTMLStripCharFilterFactory/
tokenizer class=solr.WhitespaceTokenizerFactory/

filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
  /analyzer
  analyzer type=query
  charFilter class=solr.HTMLStripCharFilterFactory/!--
escapedTags=lt;,gt;/  --
tokenizer class=solr.WhitespaceTokenizerFactory/

   !--  filter class=solr.LengthFilterFactory min=2 max=50 / --
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
  /analyzer
/fieldType

when I am checking with analysis.jsp it giving true result. But in my query
result still I am getting html tage..
I am using solrj client..

please help me


how to patch solr

2010-02-22 Thread Ranveer Kumar
Hi All,

I have no idea about How to run patch?
I am using windows os and I need to patch
https://issues.apache.org/jira/secure/attachment/12407047/SOLR-1139.patch
Currently I download solr 1.4 and using.
Should I need to download source code and compiled. or can patch jar
(compiled) file directly..

please guide from basics..

thanks


Re: Facet search concept problem

2010-02-15 Thread Ranveer Kumar
Hi Eric, Raju

Thanks for reply..

It means I need to index separate table data (news, article and blog),
currently I am joining the table and making a single rows for all three
table.

One other thing I want to know that, in this case (if i indexing table data
separately then) some column of the table is not common. so it will go blank
while indexing for other table.
for example: news and article have some other column like, city which is not
common and not in the other table, if I am indexing other table then this
column will go blank.
is this ok to leaving blank field?

also in this case no. of column will increase so is there any limitation in
solr regarding no. of column?

thanks

On Mon, Feb 15, 2010 at 2:57 PM, NarasimhaRaju rajux...@yahoo.com wrote:

 Hi,
 you should have a new field in your index say 'type' which will have values
 'news','article' and 'blog' for documents news,article and blog
 respectively.
 when searching with facet's elabled make use of this 'type' field then you
 will get what you wanted.

 Regards,
 P.N.Raju,





 
 From: Ranveer Kumar ranveer.s...@gmail.com
 To: solr-user@lucene.apache.org
 Sent: Sun, February 14, 2010 5:45:54 AM
 Subject: Facet search concept problem

 Hi All,

 My concept still not clear about facet search.

 I am trying to search using facet query. I am indexing data from three
 table, following is the detail of table:

 table name: news
 news_id
 news_details

 table name : article
 article_id
 article_details

 table name: blog
 blog_id
 blog_details

 I am indexing above tables as:
 id
 news_id
 news_details
 article_id
 article_details
 blog_id
 blog_details

 Now I want, when user search by soccer game and search match in all field
 news(5), article(4) and blog(2),
 then it should be list like:
 news(5)
 article(4)
 blog(2)

 currently facet listing like:
 soccer(5)
 game(6)

 please help me..
 thanks







Facet search concept problem

2010-02-13 Thread Ranveer Kumar
Hi All,

My concept still not clear about facet search.

I am trying to search using facet query. I am indexing data from three
table, following is the detail of table:

table name: news
news_id
news_details

table name : article
article_id
article_details

table name: blog
blog_id
blog_details

I am indexing above tables as:
id
news_id
news_details
article_id
article_details
blog_id
blog_details

Now I want, when user search by soccer game and search match in all field
news(5), article(4) and blog(2),
then it should be list like:
news(5)
article(4)
blog(2)

currently facet listing like:
soccer(5)
game(6)

please help me..
thanks


joining two field for query

2010-02-09 Thread Ranveer Kumar
Hi all,

I need logic in solr to join two field in query;
I indexed two field : id and body(text type).

5 rows are indexed:
id=1 : text= nokia samsung
id=2 : text= sony vaio nokia samsung
id=3 : text= vaio nokia
etc..

I am searching by q=id:1 returning result perfectly, returning nokia
samsung.

I am searching by nokia and resulting (listing) 1,2,3 field with short
description.
There is link on search list(like google), by clicking on link performing
new search (opening doc from index), for this search

I want to join two fields:
id:1 + queryString (nokia samsung) to return only id:1 record and want to
highlight the field nokia samsung.
something like : q=id:1 + body:nokia samsung

basically I want to highlight the query string when clicking on link and
opening the new windows (like google cache).

please help..
thanks


Re: joining two field for query (Solved)

2010-02-09 Thread Ranveer Kumar
Hi Ahmet,

Thank you very much..
my problem solved..

with regards


On Tue, Feb 9, 2010 at 5:38 PM, Ahmet Arslan iori...@yahoo.com wrote:


  I am searching by nokia and resulting (listing) 1,2,3
  field with short
  description.
  There is link on search list(like google), by clicking on
  link performing
  new search (opening doc from index), for this search
 
  I want to join two fields:
  id:1 + queryString (nokia samsung) to return only id:1
  record and want to
  highlight the field nokia samsung.
  something like : q=id:1 + body:nokia samsung
 
  basically I want to highlight the query string when
  clicking on link and
  opening the new windows (like google cache).

 When the user clicks document (id=1), you can use these parameters:
 q=body:(nokia samsung)fq=id:1hl=truehl.fl=body







Embedded Solr problem

2010-02-07 Thread Ranveer Kumar
Hi All,

I am still very new to solr.
Currently I am facing problem to use EmbeddedSolrServer.
following is my code:

File home = new
File(D:/ranveer/java/solr_home/solr/first);
CoreContainer coreContainer = new CoreContainer();
SolrConfig config = null;
config = new SolrConfig(home + /core1,solrconfig.xml,null);
CoreDescriptor descriptor = new CoreDescriptor(coreContainer,core1,home +
/core1);
SolrCore core = new SolrCore(core1, home+/core1/data, config, new
IndexSchema(config, schema.xml,null), descriptor);
coreContainer.register(core.getName(), core, true);
final EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer,
core1);

Now my problem is every time when I making request for search SolrCore is
initializing the core.
I want if the core/instance of core is already start then just use
previously started core.
Due to this problem right now searching is taking too much time.
I tried to close core after search but same thing when fresh search result
is made, solr is starting from very basic.

please help..
thanks


Re: Embedded Solr problem

2010-02-07 Thread Ranveer Kumar
Hi Sven,
thanks for reply.

yes i notice that every time when request, new instance is created of solr
server.
could you please guide me to do the same ( initialization to create an
instance of SolrServer, once during first request).


On Mon, Feb 8, 2010 at 2:11 AM, Sven Maurmann sven.maurm...@kippdata.dewrote:

 Hi,

 would it be possible that you instantiate a new instance of your SolrServer
 every time you do a query?

 You should use the code you quoted in your mail once during initialization
 to create an instance of SolrServer (the interface being implemented by
 EmbeddedSolrServer) and subsquently use the query method of SolrServer to
 do the query.

 Cheers,
Sven


 --On Sonntag, 7. Februar 2010 21:54 +0530 Ranveer Kumar 
 ranveer.s...@gmail.com wrote:

  Hi All,

 I am still very new to solr.
 Currently I am facing problem to use EmbeddedSolrServer.
 following is my code:

File home = new
 File(D:/ranveer/java/solr_home/solr/first);
 CoreContainer coreContainer = new CoreContainer();
 SolrConfig config = null;
 config = new SolrConfig(home + /core1,solrconfig.xml,null);
 CoreDescriptor descriptor = new CoreDescriptor(coreContainer,core1,home
 + /core1);
 SolrCore core = new SolrCore(core1, home+/core1/data, config, new
 IndexSchema(config, schema.xml,null), descriptor);
 coreContainer.register(core.getName(), core, true);
 final EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer,
 core1);

 Now my problem is every time when I making request for search SolrCore is
 initializing the core.
 I want if the core/instance of core is already start then just use
 previously started core.
 Due to this problem right now searching is taking too much time.
 I tried to close core after search but same thing when fresh search result
 is made, solr is starting from very basic.

 please help..
 thanks




html tag problem while searching

2010-02-05 Thread Ranveer Kumar
Hi All,

I have problem related to html tag.

Basically in database some column carry html tage, for example
p Hello how are you? /p
I am indexing same as it is in index.

I am filtering solr supported special character at query time.

now the problem is when I am searching by p then result is
*p Hello how are you? /p*
I dont want to search in html tag content?

please help?

thanks


getting error when : in the query

2010-01-31 Thread Ranveer Kumar
Hi All,

Facing problem when someone searching the string which carry special
character  : .
For example:

when querying by ipod:touch then throwing exception due to  : .

Jan 31, 2010 9:56:35 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: undefined field ipod

my full query is :
http://localhost:8080/solr/select?q=ipod:touchhl=truestart=0rows=10hl.fragsize=0hl.fl=bodyhl.snippets=2wt=xmlversion=2.2

is there any configuration to allow : in query.
please help.

thanks
with regards
Ranveer K Kumar


Re: getting error when : in the query

2010-01-31 Thread Ranveer Kumar
Hi
thanks for reply.

Is it possible to filter the special character. If I will allow then need to
put \ before every special character, which will consume time and create
performance issue. So I want to just filter those special char from user
input query.

However I would also like to know that, is there any short way to put \
before special character which will not effect the performance.

thanks
with regards

On Sun, Jan 31, 2010 at 10:09 PM, NarasimhaRaju rajux...@yahoo.com wrote:

 Hi,
 you have to escape lucene special characters present in usersearch term
 before handing it over to QueryParser.
 for more info look at
 http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#Escaping%20Special%20Characters



  “ There are only 10 types of people in this world:-
 Those who understand binary and those who don’t “


 Regards,
 P.N.Raju,




 
 From: Ranveer Kumar ranveer.s...@gmail.com
 To: solr-user@lucene.apache.org
 Sent: Sun, January 31, 2010 5:35:37 PM
 Subject: getting error when : in the query

 Hi All,

 Facing problem when someone searching the string which carry special
 character  : .
 For example:

 when querying by ipod:touch then throwing exception due to  : .

 Jan 31, 2010 9:56:35 PM org.apache.solr.common.SolrException log
 SEVERE: org.apache.solr.common.SolrException: undefined field ipod

 my full query is :

 http://localhost:8080/solr/select?q=ipod:touchhl=truestart=0rows=10hl.fragsize=0hl.fl=bodyhl.snippets=2wt=xmlversion=2.2

 is there any configuration to allow : in query.
 please help.

 thanks
 with regards
 Ranveer K Kumar







How to disable wildcard search

2010-01-27 Thread Ranveer Kumar
Hi all,

How to remove/disable wildcard search in solr.
I have no requirement of wildcard.
is there any configuration to disable wildcard search in solr.

I am using solrj for searching..

thanks
With regards
Ranveer K Kumar


Re: Hindi language support in solr

2010-01-22 Thread Ranveer kumar
Hi Robert,

Thanks for reply.
As you write, I used textgen but still not able to search hindi text.
Might be missing some important configuration.
following is my schema.xml configuration

 fieldType name=textgen class=solr.TextField
positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true /
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=0/
   filter class=solr.LowerCaseFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
 filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=0/
 filter class=solr.LowerCaseFilterFactory/
  /analyzer
/fieldType

fields
  field name=id type=string indexed=true stored=true
required=true /

   field name=cat_name type=textgen indexed=true stored=true /
   field name=title type=textgen indexed=true stored=true /
   field name=summary type=textgen indexed=true stored=true /

   field name=textgen type=textgen indexed=true stored=false
multiValued=true/
/fields
uniqueKeyid/uniqueKey
 defaultSearchFieldtextgen/defaultSearchField
 solrQueryParser defaultOperator=OR/
   copyField source=title dest=textgen/
   copyField source=cat_name dest=textgen/
   copyField source=summary dest=textgen/


In the summary field there are hindi keywords.
Please help..

thanks
with regards
Ranveer K Kumar









On Thu, Jan 21, 2010 at 11:25 PM, Robert Muir rcm...@gmail.com wrote:

 hello, take a look at field type textgen (a general unstemmed text field)

 the whitespacetokenizer + worddelimiterfilter used by this type will
 work correctly for hindi tokenization and punctuation.

 On Thu, Jan 21, 2010 at 10:55 AM, Ranveer kumar
 ranveer.k.ku...@gmail.com wrote:
  Hi all,
 
  I am very new in solr.
  I download latest release 1.4 and install. For Indexing and Searching I
 am
  using SolrJ api.
  My Question is How to enable solr to search hindi language text ?.
  Please Help me..
 
  thanks
  with regards
  Ranveer K Kumar
 



 --
 Robert Muir
 rcm...@gmail.com



Hindi language support in solr

2010-01-21 Thread Ranveer kumar
Hi all,

I am very new in solr.
I download latest release 1.4 and install. For Indexing and Searching I am
using SolrJ api.
My Question is How to enable solr to search hindi language text ?.
Please Help me..

thanks
with regards
Ranveer K Kumar