Re: MorphlineSolrSink

2013-07-15 Thread Ashish
On Tue, Jul 16, 2013 at 2:19 AM, Rajesh Jain  wrote:

> Newbie question:
>
> I have a Flume server, where I am writing to sink which is a RollingFile
> Sink.
>
> I have to take this files from the sink and send it to Solr which can index
> and provide search.
>
> Do I need to configure MorphineSolrSink?
>

Yes


>
> What is the mechanism's to do this or send this data over to Solr.
>

More details here
http://flume.apache.org/FlumeUserGuide.html#morphlinesolrsink

As suggested, please move further related question to Flume User ML.


>
> Thanks,
> Rajesh
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Question about Stemmer

2015-07-29 Thread Ashish Mukherjee
Hello,

I am using Stemmer on a Ngram field. I am getting better results with
Stemmer factory after Ngram, but I was wondering what is the recommended
practice when using Stemmer on Ngram field?

Regards,
Ashish


Multiple concurrent queries to Solr

2015-08-23 Thread Ashish Mukherjee
Hello,

I want to run few Solr queries in parallel, which are being done in a
multi-threaded model now. I was wondering if there are any client libraries
to query Solr  through a non-blocking I/O mechanism instead of a threaded
model. Has anyone attempted something like this?

Regards,
Ashish


Re: Multiple concurrent queries to Solr

2015-08-23 Thread Ashish Mukherjee
Thanks, everyone. Arcadius, that ticket is interesting.

I was wondering if an implementation of SolrClient could be based on
HttpAsyncClient
instead of HttpSolrClient. Just a thought right now, which needs to be
explored deeper.

- Ashish

On Mon, Aug 24, 2015 at 1:46 AM, Arcadius Ahouansou 
wrote:

> Hello Ashish.
>
> Therse is an unfinished work about this at
> https://issues.apache.org/jira/browse/SOLR-3383
>
> Maybe you want to have a look and contribute?
>
> Arcadius.
>
> On 23 August 2015 at 17:02, Walter Underwood 
> wrote:
>
> > The last time that I used the HTTPClient library, it was non-blocking. It
> > doesn’t try to read from the socket until you ask for data from the
> > response object. That allows parallel requests without threads.
> >
> > Underneath, it has a pool of connections that can be reused. If the pool
> > is exhausted, it can block.
> >
> > wunder
> > Walter Underwood
> > wun...@wunderwood.org
> > http://observer.wunderwood.org/  (my blog)
> >
> >
> > On Aug 23, 2015, at 8:49 AM, Shawn Heisey  wrote:
> >
> > > On 8/23/2015 7:46 AM, Ashish Mukherjee wrote:
> > >> I want to run few Solr queries in parallel, which are being done in a
> > >> multi-threaded model now. I was wondering if there are any client
> > libraries
> > >> to query Solr  through a non-blocking I/O mechanism instead of a
> > threaded
> > >> model. Has anyone attempted something like this?
> > >
> > > The only client library that the Solr project makes is SolrJ -- the
> > > client for Java.  If you are not using the SolrJ client, then the Solr
> > > project did not write it, and you should contact the authors of the
> > > library directly.
> > >
> > > SolrJ and Solr are both completely thread-safe, and multiple threads
> are
> > > recommended for highly concurrent usage.  SolrJ uses HttpClient for
> > > communication with Solr.
> > >
> > > I was not able to determine whether the default httpclient settings
> will
> > > result in non-blocking I/O or not. As far as I am aware, nothing in
> > > SolrJ sets any explicit configuration for blocking or non-blocking I/O.
> > > You can create your own HttpClient object in a SolrJ program and have
> > > the SolrClient object use it.
> > >
> > > HttpClient uses HttpCore.  Here is the main web page for these
> > components:
> > >
> > > https://hc.apache.org/
> > >
> > > On this webpage, it says "HttpCore supports two I/O models: blocking
> I/O
> > > model based on the classic Java I/O and non-blocking, event driven I/O
> > > model based on Java NIO."  There is no information here about which
> > > model is chosen by default.
> > >
> > > Thanks,
> > > Shawn
> > >
> >
> >
>
>
> --
> Arcadius Ahouansou
> Menelic Ltd | Information is Power
> M: 07908761999
> W: www.menelic.com
> ---
>


Solr score distribution usage

2015-09-08 Thread Ashish Mukherjee
Hello,

I would like to use the Solr score distribution to pick up most relevant
documents from the search result. Rather than top n results, I am
interested only in picking up the most relevant based on statistical
distribution of the scores.

A brief study of some sample searches (the most frequently searched terms)
on my data-set shows that the mode and median scores seem to coincide or be
very close together. Is this the kind of trend which is generally observed
in Solr (though I understand variations on specific searches)? Hence, I was
considering using statistical mode as the threshold above which I use the
documents from the result.

Has anyone done something like this before or would like to critique my
approach?

Regards,
Ashish


SpellCheck component query

2015-03-07 Thread Ashish Mukherjee
Hello,

I have enabled the Spellcheck component in Solr, which gives me spelling
suggestions. However, I would like those suggestions to be applied in the
same select request handler to retrieve additional results based on the
suggestions. How can this be achieved with Solr?

Regards,
Ashish


Re: SpellCheck component query

2015-03-08 Thread Ashish Mukherjee
Hi Aman,

Thanks for your response.

Taking your example further to elaborate what I am looking to do -

if user types 'chai' and suggestion is 'chat' , then I would like to see
all the values which 'chat' in them as suggestions, such as 'text chat',
'video chat', 'audio chat' etc. without making another search request for
'chat'.

Can this be accomplished?

Regards,
Ashish

On Mon, Mar 9, 2015 at 2:50 AM, Aman Tandon  wrote:

> Hi,
>
> AFAIK solr currently not providing this feature.
>
> Suppose a scenario, the user is trying to search for "chai" (hindi meaning
> of tea). And in your index you have more documents containing the keyword
> "chat" as compared to the the keyword "chai".
>
> chat => 501
> chai => 29
>
> and the maxQueryFrequency is 25.
>
> So solr will suggest you chat as this term is present in more documents and
> if you want from solr to search internally for the suggestion then you will
> be displaying he results of chat to the user when the user intended to
> search for chai.
>
> So I suppose it is good to show wrong suggestion instead of providing the
> inappropriate results to the user.
>
> In this case you could the show the chat and chai as suggestion to the user
> and then he could select the appropriate suggestion.
>
> With Regards
> Aman Tandon
>
> On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee <
> ashish.mukher...@gmail.com
> > wrote:
>
> > Hello,
> >
> > I have enabled the Spellcheck component in Solr, which gives me spelling
> > suggestions. However, I would like those suggestions to be applied in the
> > same select request handler to retrieve additional results based on the
> > suggestions. How can this be achieved with Solr?
> >
> > Regards,
> > Ashish
> >
>


Solr phonetics with spelling

2015-03-10 Thread Ashish Mukherjee
Hello,

Couple of questions related to phonetics -

1. If I enable the phonetic filter in managed-schema file for a particular
field, how does it affect the spell handler?

2. What is the meaning of the inject attribute within  in
managed-schema? The documentation is not very clear about it.

Regards,
Ashish


Chaining components in request handler

2015-03-10 Thread Ashish Mukherjee
Hello,

I would like to create a request handler which chains components in a
particular sequence to return the result, similar to a Unix pipe.

eg. Component 1 -> result1 -> Component 2 -> result2

result2 is final result returned.

Component 1 may be a standard component, Component 2 may be out of the box.

Is there any tutorial which describes how to wire together components like
this in a single handler?

Regards,
Ashish


Re: Chaining components in request handler

2015-03-12 Thread Ashish Mukherjee
Would like to do it during querying.

Thanks,
Ashish

On Tue, Mar 10, 2015 at 11:07 PM, Alexandre Rafalovitch 
wrote:

> Is that during indexing or during query phase?
>
> Indexing has UpdateRequestProcessors (e.g.
> http://www.solr-start.com/info/update-request-processors/ )
> Query has Components (e.g. Faceting, MoreLIkeThis, etc)
>
> Or something different?
>
> Regards,
>Alex.
> 
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 10 March 2015 at 13:34, Ashish Mukherjee 
> wrote:
> > Hello,
> >
> > I would like to create a request handler which chains components in a
> > particular sequence to return the result, similar to a Unix pipe.
> >
> > eg. Component 1 -> result1 -> Component 2 -> result2
> >
> > result2 is final result returned.
> >
> > Component 1 may be a standard component, Component 2 may be out of the
> box.
> >
> > Is there any tutorial which describes how to wire together components
> like
> > this in a single handler?
> >
> > Regards,
> > Ashish
>


Solr Start-Up Error

2016-11-16 Thread Ashish Kumar9
ader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:368)
at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:306)
at 
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:259)
at 
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1498)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1435)
... 7 more

Usage: java -jar start.jar [options] [properties] [configs]
   java -jar start.jar --help  # for more information
[root@sys-77402 bin]# 

Thanks
Ashish



Facing Issue in SOLR 6.6 Indexing - solr unexpected eof in prolog

2017-09-08 Thread ashish sharma
Hello Everyone,
I am trying the new Solr 6.6 and using SolrPhpClient to create index having 
info in an array.
$parts = array( '0' => array( 'id' => '0060248025', 'name' => 'Falling Up', 
'author' => 'Shel Silverstein',  'inStock' => true, ), '1' => array( 'id' => 
'0679805273', 'name' => 'Oh, The Places You will Go', 'author' => 'Dr. Seuss',  
'inStock' => false, ) );
But I am facing an error "solr unexpected eof in prolog". The final XML formed 
and going for indexing is ...
0060248025Falling 
UpShel Silverstein10679805273Oh, The Places You will GoDr. 
Seuss

I am not getting what the issue is & how to resolve. Can anyone help?
Also, I have tried picking one  node and added the same in the example xml 
and tried indexing using command and that is working fine. So seems there is no 
issue with the info I am providing.
Please help! 
ThanksAshish



search on date field

2009-03-05 Thread Ashish P

I want to search on single date field
e.g. q=creationDate:2009-01-24T15:00:00.000Z&rows=10

But I think the query gets terminated after T15 as ':' ( COLON ) is taken as
termination character.

Any ideas on how to search on single date or for that matter if query data
contains COLON then how to search. 
-- 
View this message in context: 
http://www.nabble.com/search-on-date-field-tp22364587p22364587.html
Sent from the Solr - User mailing list archive at Nabble.com.



index multi valued field into multiple fields

2009-03-05 Thread Ashish P

I have a multi valued field as follows:


I want to index the data from this field into following fields



How can this be done?? Any ideas...
-- 
View this message in context: 
http://www.nabble.com/index-multi-valued-field-into-multiple-fields-tp22364915p22364915.html
Sent from the Solr - User mailing list archive at Nabble.com.



supported document types

2009-03-05 Thread Ashish P

What are the types of documents types ( Mime types ) supported for indexing
and searching in solr.
-- 
View this message in context: 
http://www.nabble.com/supported-document-types-tp22366114p22366114.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: search on date field

2009-03-05 Thread Ashish P

It works 
thanks
Ashish

Shalin Shekhar Mangar wrote:
> 
> On Fri, Mar 6, 2009 at 7:03 AM, Ashish P  wrote:
> 
>>
>> I want to search on single date field
>> e.g. q=creationDate:2009-01-24T15:00:00.000Z&rows=10
>>
>> But I think the query gets terminated after T15 as ':' ( COLON ) is taken
>> as
>> termination character.
>>
>> Any ideas on how to search on single date or for that matter if query
>> data
>> contains COLON then how to search.
> 
> 
> You can escape the ':' character by preceding it with a back slash '\'.
> e,g,
> 
> q=creationDate:2009-01-24T15\:00\:00.000Z
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-search-on-date-field-tp22365586p22366358.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: index multi valued field into multiple fields

2009-03-05 Thread Ashish P

OK. so basically what you are saying is when you use copyField, it will copy
the whole data from one field to other many fields but it can not copy part
of data to other field.
Because within same tokenizing ( when I am tokenizing "condition" field ) I
want part of data to go into content field and part of data to go into
tsdatetime field. But that looks like not possible.
The field "condition" is actually mix of multiple data values.


Shalin Shekhar Mangar wrote:
> 
> On Fri, Mar 6, 2009 at 7:40 AM, Ashish P  wrote:
> 
>>
>> I have a multi valued field as follows:
>> >
>> name="condition">
>>
>> I want to index the data from this field into following fields
>> 
>> 
>>
>> How can this be done?? Any ideas...
> 
> 
> Use a copyField (look at the schema shipped with solr for an example).
> 
> However, you can copy individual values from a multi-valued field into two
> different fields. The copyField of a multi-valued field should also be
> multi-valued otherwise it will retain only the last value.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/index-multi-valued-field-into-multiple-fields-tp22364915p22366393.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: index multi valued field into multiple fields

2009-03-05 Thread Ashish P

hmm. I think I will just do that. 
Thanks for clearing my doubt...
-Ashish


Shalin Shekhar Mangar wrote:
> 
> On Fri, Mar 6, 2009 at 10:53 AM, Ashish P 
> wrote:
> 
>>
>> OK. so basically what you are saying is when you use copyField, it will
>> copy
>> the whole data from one field to other many fields but it can not copy
>> part
>> of data to other field.
> 
> 
> Yes, it will try to copy all the data.
> 
> 
>>
>> Because within same tokenizing ( when I am tokenizing "condition" field )
>> I
>> want part of data to go into content field and part of data to go into
>> tsdatetime field. But that looks like not possible.
>> The field "condition" is actually mix of multiple data values.
>>
> 
> Why not send both values to different fields at index time explicitly?
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/index-multi-valued-field-into-multiple-fields-tp22364915p22366918.html
Sent from the Solr - User mailing list archive at Nabble.com.



problem using dataimporthandler

2009-03-08 Thread Ashish P

I am getting following exception on configuring dataImporthandler in
SolrConfig.xml

INFO: Processing configuration from solrconfig.xml: {config=data-config.xml}
[Fatal Error] :1:1: Content is not allowed in prolog.
Mar 9, 2009 12:01:37 PM org.apache.solr.handler.dataimport.DataImportHandler
inf
orm
SEVERE: Exception while loading DataImporter
org.apache.solr.handler.dataimport.DataImportHandlerException: Exception
occurre
d while initializing context Processing Document #
at
org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataIm
porter.java:176)

Please let me know if any clues..
Thanks
-- 
View this message in context: 
http://www.nabble.com/problem-using-dataimporthandler-tp22406450p22406450.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: problem using dataimporthandler

2009-03-08 Thread Ashish P

Hi 
Following is the data-config.xml

 
 

 
 
 
 
 
 
 
 

Not sure what is the error here, really stuck...
Thanks,
Ashish


Noble Paul നോബിള്‍  नोब्ळ् wrote:
> 
> can u paste the data-config.xml
> looks like there are some errors in the xml.
> --Noble
> 
> On Mon, Mar 9, 2009 at 8:35 AM, Ashish P  wrote:
>>
>> I am getting following exception on configuring dataImporthandler in
>> SolrConfig.xml
>>
>> INFO: Processing configuration from solrconfig.xml:
>> {config=data-config.xml}
>> [Fatal Error] :1:1: Content is not allowed in prolog.
>> Mar 9, 2009 12:01:37 PM
>> org.apache.solr.handler.dataimport.DataImportHandler
>> inf
>> orm
>> SEVERE: Exception while loading DataImporter
>> org.apache.solr.handler.dataimport.DataImportHandlerException: Exception
>> occurre
>> d while initializing context Processing Document #
>>        at
>> org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataIm
>> porter.java:176)
>>
>> Please let me know if any clues..
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/problem-using-dataimporthandler-tp22406450p22406450.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> --Noble Paul
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-using-dataimporthandler-tp22406450p22407391.html
Sent from the Solr - User mailing list archive at Nabble.com.



Querying DB indexed data

2009-03-09 Thread Ashish P

Hi,
I performed steps given in http://wiki.apache.org/solr/DataImportHandler to
index data from database.

the data-config.xml is 











now I am able to view data that is indexed using URL
http://localhost:8080/solr/admin/dataimport.jsp to see the data as

- 
  user1 
  
- 
  0 
  
- 
  CN=user1,OU=R&D 
  
  

But when I search user_name:user1 then the result is not returned at all.
Am I missing something here??? Please help.
Thanks,
Ashish


-- 
View this message in context: 
http://www.nabble.com/Querying-DB-indexed-data-tp22428120p22428120.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Querying DB indexed data

2009-03-09 Thread Ashish P


In schema xml, I have defined following...



Thanks,
Ashish


Shalin Shekhar Mangar wrote:
> 
> On Tue, Mar 10, 2009 at 10:31 AM, Ashish P 
> wrote:
> 
>> now I am able to view data that is indexed using URL
>> http://localhost:8080/solr/admin/dataimport.jsp to see the data as
>> 
>> - 
>>  user1
>>  
>> - 
>>  0
>>  
>> - 
>>  CN=user1,OU=R&D
>>  
>>  
>>
>> But when I search user_name:user1 then the result is not returned at all.
>>
> 
> What is the type of the user_name field as defined in schema.xml?
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Querying-DB-indexed-data-tp22428120p22428239.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Querying DB indexed data

2009-03-09 Thread Ashish P

Oh looks like some other big problem, Now I am not able to see other text
data I indexed before adding DB data to index...
Can not search any data...But I am sure I was able to search before adding
DB to index
Any pointers???



Shalin Shekhar Mangar wrote:
> 
> On Tue, Mar 10, 2009 at 10:48 AM, Ashish P 
> wrote:
> 
>>
>>
>> In schema xml, I have defined following...
>> 
>>> stored="true" />
>>> stored="true" />
>> Thanks,
>> Ashish
>>
>>
> If you search for *:* from the admin, do you see documents with user_name
> name1 present?
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Querying-DB-indexed-data-tp22428120p22428364.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Querying DB indexed data

2009-03-09 Thread Ashish P

yes I did full import. so previous docs are gone as you said.
But when I do  http://localhost:8080/solr/dataimport I get following
response

 
- 
  0 
  0 
  
- 
- 
  my-dataConfig.xml 
  
  
  idle 
   
- 
  1 
  119 
  0 
  2009-03-10 14:49:58 
  Indexing completed. Added/Updated: 0 documents. Deleted 0
documents. 
  2009-03-10 14:49:58 
  2009-03-10 14:49:58 
  0:0:0.141 
  
  This response format is experimental. It is likely to
change in the future. 
  

I shows imported row numbers, indexing complete buts adds 0 documents. Does
that suggest anything..


Shalin Shekhar Mangar wrote:
> 
> On Tue, Mar 10, 2009 at 11:01 AM, Ashish P 
> wrote:
> 
>>
>> Oh looks like some other big problem, Now I am not able to see other text
>> data I indexed before adding DB data to index...
>> Can not search any data...But I am sure I was able to search before
>> adding
>> DB to index
>> Any pointers???
>>
>>
> So you added some documents before running a full-import with
> DataImportHandler? When you do a full-import, all previous documents are
> deleted. That may be a reason.
> 
> However, there should be some documents which DataImportHandler created.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Querying-DB-indexed-data-tp22428120p22428518.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Querying DB indexed data

2009-03-09 Thread Ashish P

Hi Shalin,
Got the answer. I had uniquekey defined in schema.xml but that was not
present in any columns hence problem for indexing.
Thanks a lot for your help buddy.
Cheers,
Ashish

Ashish P wrote:
> 
> yes I did full import. so previous docs are gone as you said.
> But when I do  http://localhost:8080/solr/dataimport I get following
> response
> 
>  
> - 
>   0 
>   0 
>   
> - 
> - 
>   my-dataConfig.xml 
>   
>   
>   idle 
>
> - 
>   1 
>   119 
>   0 
>   2009-03-10 14:49:58 
>   Indexing completed. Added/Updated: 0 documents. Deleted 0
> documents. 
>   2009-03-10 14:49:58 
>   2009-03-10 14:49:58 
>   0:0:0.141 
>   
>   This response format is experimental. It is likely
> to change in the future. 
>   
> 
> I shows imported row numbers, indexing complete buts adds 0 documents.
> Does that suggest anything..
> 
> 
> Shalin Shekhar Mangar wrote:
>> 
>> On Tue, Mar 10, 2009 at 11:01 AM, Ashish P 
>> wrote:
>> 
>>>
>>> Oh looks like some other big problem, Now I am not able to see other
>>> text
>>> data I indexed before adding DB data to index...
>>> Can not search any data...But I am sure I was able to search before
>>> adding
>>> DB to index
>>> Any pointers???
>>>
>>>
>> So you added some documents before running a full-import with
>> DataImportHandler? When you do a full-import, all previous documents are
>> deleted. That may be a reason.
>> 
>> However, there should be some documents which DataImportHandler created.
>> 
>> -- 
>> Regards,
>> Shalin Shekhar Mangar.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Querying-DB-indexed-data-tp22428120p22428615.html
Sent from the Solr - User mailing list archive at Nabble.com.



SolrJ XML indexing

2009-03-11 Thread Ashish P

I have an XML file with structure :

   ...
   ...
   .
   .


It is present on disk on some location let's say C:\\documents.xml

Q.1. Using solrJ can I index all docs in this file directly?? or do I have
to convert each document to solrInputDocument by parsing XML

Q.2 How to use DirectXmlRequest?? any example

Thanks in advance...
Ashish




-- 
View this message in context: 
http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22450845.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrJ XML indexing

2009-03-11 Thread Ashish P

Thanks man. 
I just tried what u suggested but I am getting following error when
performing request
Mar 11, 2009 6:00:28 PM org.apache.solr.update.SolrIndexWriter getDirectory
WARNING: No lockType configured for C:\dw-solr\solr\./data/index/ assuming
'simple'
Mar 11, 2009 6:00:29 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed
out:
simplefsl...@c:\dw-solr\solr\.\data\index\lucene-1d6c0059ac2f9f2c83acf749af7e0906-write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:85)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1140)
at org.apache.lucene.index.IndexWriter.(IndexWriter.java:938)
at 
org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:116)

Any ideas???

-Ashish


Noble Paul നോബിള്‍  नोब्ळ् wrote:
> 
> String xml = null;//load the file to the xml string
> DirectXmlRequest up = new DirectXmlRequest( "/update", xml );
> solrServer.request( up );
> 
> On Wed, Mar 11, 2009 at 2:19 PM, Ashish P 
> wrote:
>>
>> I have an XML file with structure :
>> 
>>   ...
>>   ...
>>   .
>>   .
>> 
>>
>> It is present on disk on some location let's say C:\\documents.xml
>>
>> Q.1. Using solrJ can I index all docs in this file directly?? or do I
>> have
>> to convert each document to solrInputDocument by parsing XML
>>
>> Q.2 How to use DirectXmlRequest?? any example
>>
>> Thanks in advance...
>> Ashish
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22450845.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> --Noble Paul
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22451049.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrJ XML indexing

2009-03-11 Thread Ashish P

I added single in indexDefaults that made the error
before go away but now I am getting following error :

Mar 11, 2009 6:12:56 PM org.apache.solr.common.SolrException log
SEVERE: java.io.IOException: Cannot overwrite:
C:\dw-solr\solr\data\index\_1o.fdt
at 
org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:62)
at
org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:65)

Please help..


Ashish P wrote:
> 
> Thanks man. 
> I just tried what u suggested but I am getting following error when
> performing request
> Mar 11, 2009 6:00:28 PM org.apache.solr.update.SolrIndexWriter
> getDirectory
> WARNING: No lockType configured for C:\dw-solr\solr\./data/index/ assuming
> 'simple'
> Mar 11, 2009 6:00:29 PM org.apache.solr.common.SolrException log
> SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain
> timed out:
> simplefsl...@c:\dw-solr\solr\.\data\index\lucene-1d6c0059ac2f9f2c83acf749af7e0906-write.lock
>   at org.apache.lucene.store.Lock.obtain(Lock.java:85)
>   at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1140)
>   at org.apache.lucene.index.IndexWriter.(IndexWriter.java:938)
>   at
> org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:116)
> 
> Any ideas???
> 
> -Ashish
> 
> 
> Noble Paul നോബിള്‍  नोब्ळ् wrote:
>> 
>> String xml = null;//load the file to the xml string
>> DirectXmlRequest up = new DirectXmlRequest( "/update", xml );
>> solrServer.request( up );
>> 
>> On Wed, Mar 11, 2009 at 2:19 PM, Ashish P 
>> wrote:
>>>
>>> I have an XML file with structure :
>>> 
>>>   ...
>>>   ...
>>>   .
>>>   .
>>> 
>>>
>>> It is present on disk on some location let's say C:\\documents.xml
>>>
>>> Q.1. Using solrJ can I index all docs in this file directly?? or do I
>>> have
>>> to convert each document to solrInputDocument by parsing XML
>>>
>>> Q.2 How to use DirectXmlRequest?? any example
>>>
>>> Thanks in advance...
>>> Ashish
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22450845.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> 
>> -- 
>> --Noble Paul
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22451235.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrJ XML indexing

2009-03-11 Thread Ashish P

Yes cleaning up works...
But not sure how to avoid this happening again??
-Ashish


jonbaer wrote:
> 
> Id suggest what someone else mentioned to just do a full clean up of  
> the index.  Sounds like you might have kill -9 or stopped the process  
> manually while indexing (would be only reason for a left over lock).
> 
> - Jon
> 
> On Mar 11, 2009, at 5:16 AM, Ashish P wrote:
> 
>>
>> I added single in indexDefaults that made the  
>> error
>> before go away but now I am getting following error :
>>
>> Mar 11, 2009 6:12:56 PM org.apache.solr.common.SolrException log
>> SEVERE: java.io.IOException: Cannot overwrite:
>> C:\dw-solr\solr\data\index\_1o.fdt
>>  at  
>> org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
>>  at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:62)
>>  at
>> org 
>> .apache 
>> .lucene 
>> .index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:65)
>>
>> Please help..
>>
>>
>> Ashish P wrote:
>>>
>>> Thanks man.
>>> I just tried what u suggested but I am getting following error when
>>> performing request
>>> Mar 11, 2009 6:00:28 PM org.apache.solr.update.SolrIndexWriter
>>> getDirectory
>>> WARNING: No lockType configured for C:\dw-solr\solr\./data/index/  
>>> assuming
>>> 'simple'
>>> Mar 11, 2009 6:00:29 PM org.apache.solr.common.SolrException log
>>> SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock  
>>> obtain
>>> timed out:
>>> simplefsl...@c:\dw-solr\solr\.\data\index 
>>> \lucene-1d6c0059ac2f9f2c83acf749af7e0906-write.lock
>>> at org.apache.lucene.store.Lock.obtain(Lock.java:85)
>>> at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1140)
>>> at org.apache.lucene.index.IndexWriter.(IndexWriter.java:938)
>>> at
>>> org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java: 
>>> 116)
>>>
>>> Any ideas???
>>>
>>> -Ashish
>>>
>>>
>>> Noble Paul നോബിള്‍  नोब्ळ् wrote:
>>>>
>>>> String xml = null;//load the file to the xml string
>>>> DirectXmlRequest up = new DirectXmlRequest( "/update", xml );
>>>> solrServer.request( up );
>>>>
>>>> On Wed, Mar 11, 2009 at 2:19 PM, Ashish P 
>>>> wrote:
>>>>>
>>>>> I have an XML file with structure :
>>>>> 
>>>>>   ...
>>>>>   ...
>>>>>   .
>>>>>   .
>>>>> 
>>>>>
>>>>> It is present on disk on some location let's say C:\\documents.xml
>>>>>
>>>>> Q.1. Using solrJ can I index all docs in this file directly?? or  
>>>>> do I
>>>>> have
>>>>> to convert each document to solrInputDocument by parsing XML
>>>>>
>>>>> Q.2 How to use DirectXmlRequest?? any example
>>>>>
>>>>> Thanks in advance...
>>>>> Ashish
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22450845.html
>>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> --Noble Paul
>>>>
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22451235.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SolrJ-XML-indexing-tp22450845p22468203.html
Sent from the Solr - User mailing list archive at Nabble.com.



SolrJ : EmbeddedSolrServer and database data indexing

2009-03-12 Thread Ashish P

Is it possible to index DB data directly to solr using EmbeddedSolrServer. I
tried using data-Config File and Full-import commad, it works. So assuming
using CommonsHttpServer will also work. But can I do it with
EmbeddedSolrServer??

Thanks in advance...
Ashish
-- 
View this message in context: 
http://www.nabble.com/SolrJ-%3A-EmbeddedSolrServer-and-database-data-indexing-tp22488697p22488697.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrJ : EmbeddedSolrServer and database data indexing

2009-03-12 Thread Ashish P

Is there any api in SolrJ that calls the dataImportHandler to execute
commands like full-import and delta-import.
Please help..


Ashish P wrote:
> 
> Is it possible to index DB data directly to solr using EmbeddedSolrServer.
> I tried using data-Config File and Full-import commad, it works. So
> assuming using CommonsHttpServer will also work. But can I do it with
> EmbeddedSolrServer??
> 
> Thanks in advance...
> Ashish
> 

-- 
View this message in context: 
http://www.nabble.com/SolrJ-%3A-EmbeddedSolrServer-and-database-data-indexing-tp22488697p22489420.html
Sent from the Solr - User mailing list archive at Nabble.com.



Field tokenizer question

2009-03-18 Thread Ashish P


I have created a field,






The pattern is "_" (Underscore)

When I do field analysis using solr admin, it shows it correctly. Have a
look at attached image. e.g. cric_info

http://www.nabble.com/file/p22594575/field%2Banalysis.jpeg 

But when I search the field, like searchbam:cric, it returns zero results.

I am expecting that I should be able to search on cric and info both
individually.

But the response is :

- 
  0 
  47 
- 
  on 
  0 
  searchbam:cric 
  10 
  2.2 
  
  
   
  

The index is properly committed.

Am I missing something here?




-- 
View this message in context: 
http://www.nabble.com/Field-tokenizer-question-tp22594575p22594575.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Field tokenizer question

2009-03-22 Thread Ashish P

Hey it works. Can you please tell me the reason??
Thanks,
Ashish

Koji Sekiguchi-2 wrote:
> 
> Ashish P wrote:
>> I have created a field,
>> 
>>  
>>  
>>  
>> 
>>
>>   
> Set class="solr.TextField" instead of class="solr.StrField" in your 
> fieldType definition.
> Then reindex and commit.
> 
> Koji
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Field-tokenizer-question-tp22594575p22653356.html
Sent from the Solr - User mailing list archive at Nabble.com.



Dynamic range Facets

2009-03-24 Thread Ashish P

my documents (products) have a price field, and I want to have 
a "dynamically" calculated range facet for that in the response. 

E.g. I want to have this in the response 
price:[* TO 20]  -> 23 
price:[20 TO 40] -> 42 
price:[40 TO *]  -> 33 
if prices are between 0 and 60 
but 
price:[* TO 100]   -> 23 
price:[100 TO 200] -> 42 
price:[200 TO *]   -> 33 
if prices are between 0 and 300 

So the question is how to get the dynamic facets response from solr.

This is same question as previously posted back in 2007. But still waits an
answer??
Is there any solution on this??
-- 
View this message in context: 
http://www.nabble.com/Dynamic-range-Facets-tp22675413p22675413.html
Sent from the Solr - User mailing list archive at Nabble.com.



search individual words but facet on delimiter

2009-03-24 Thread Ashish P

I want following output from solr:
I index a field with value -> A B;C D;E F
I have applied a pattern tokenizer on this field because I know the value
will contain ";"






So it indexes A B, C D, E F properly... So I get facets 
A B (1)
C D (1)
E F (1)
This is the exact output of facets I want.

But I also want to search this document when I just search individual word
'A' or 'D' etc. 
So I want facets exactly same as above but at the same time to be able to
search on individual words also.

Is there a way to achieve this???
Thanks in advance,
Ashish
-- 
View this message in context: 
http://www.nabble.com/search-individual-words-but-facet-on-delimiter-tp22676007p22676007.html
Sent from the Solr - User mailing list archive at Nabble.com.



get all facets

2009-03-24 Thread Ashish P

Can I get all the facets in QueryResponse??
Thanks,
Ashish
-- 
View this message in context: 
http://www.nabble.com/get-all-facets-tp22693809p22693809.html
Sent from the Solr - User mailing list archive at Nabble.com.



numeric range facets

2009-03-25 Thread Ashish P

Similar to getting range facets for date where we specify start, end and gap.
Can we do the same thing for numeric facets where we specify start, end and
gap.
-- 
View this message in context: 
http://www.nabble.com/numeric-range-facets-tp22698330p22698330.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: get all facets

2009-03-25 Thread Ashish P

Actually what I meant was if there are 100 indexed fields. So there are 100
facet fields right..
So whenever I create solrQuery, I have to do addFacetField("fieldName")
can I avoid this and just get all facet fields.

Sorry for the confusion.

Thanks again,
Ashish 


Shalin Shekhar Mangar wrote:
> 
> On Wed, Mar 25, 2009 at 7:30 AM, Ashish P 
> wrote:
> 
>>
>> Can I get all the facets in QueryResponse??
> 
> 
> You can get all the facets that are returned by the server. Set
> facet.limit
> to the number of facets you want to retrieve.
> 
> See
> http://lucene.apache.org/solr/api/solrj/org/apache/solr/client/solrj/SolrQuery.html#setFacetLimit(int)
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/get-all-facets-tp22693809p22714256.html
Sent from the Solr - User mailing list archive at Nabble.com.



filter query question

2009-04-03 Thread Ashish P

Consider, I have following 3 fields




I want to query all documents where name:somevalue and actionuser value is
not equal to creationuser value.

Can we do this???
-- 
View this message in context: 
http://www.nabble.com/filter-query-question-tp22863789p22863789.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: filter query question

2009-04-03 Thread Ashish P

Thanks Shalin.
Another question what is the meaning of this syntax 
[* TO *]

Thanks,
Ashish


Shalin Shekhar Mangar wrote:
> 
> On Fri, Apr 3, 2009 at 1:32 PM, Ashish P  wrote:
> 
>>
>> I want to query all documents where name:somevalue and actionuser value
>> is
>> not equal to creationuser value.
>>
>> Can we do this???
> 
> 
> Nope. But you can create a new field which holds true if actionuser !=
> creationuser and filter on that.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/filter-query-question-tp22863789p22864255.html
Sent from the Solr - User mailing list archive at Nabble.com.



multiple tokenizers needed

2009-04-09 Thread Ashish P

I want to analyze a text based on pattern ";" and separate on whitespace and
it is a Japanese text so use CJKAnalyzer + tokenizer also.
in short I want to do:
 



 
Can anyone please tell me how to achieve this?? Because the above syntax is
not at all possible.
-- 
View this message in context: 
http://www.nabble.com/multiple-tokenizers-needed-tp22982382p22982382.html
Sent from the Solr - User mailing list archive at Nabble.com.



How to index the contents from SVN repository

2009-04-26 Thread Ashish P

Is there any way to index contents of SVN rep in Solr ??
-- 
View this message in context: 
http://www.nabble.com/How-to-index-the-contents-from-SVN-repository-tp23240110p23240110.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to index the contents from SVN repository

2009-04-26 Thread Ashish P

Right. But is there a way to track file updates and diffs.
Thanks,
Ashish

Noble Paul നോബിള്‍  नोब्ळ् wrote:
> 
> If you can check it out into a directory using SVN command then you
> may use DIH to index the content.
> 
> a combination of FileListEntityProcessor and PlainTextEntityProcessor may
> help
> 
> 
> On Sun, Apr 26, 2009 at 1:38 PM, Ashish P 
> wrote:
>>
>> Is there any way to index contents of SVN rep in Solr ??
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-index-the-contents-from-SVN-repository-tp23240110p23240110.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> --Noble Paul
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-index-the-contents-from-SVN-repository-tp23240110p23250220.html
Sent from the Solr - User mailing list archive at Nabble.com.



half width katakana

2009-04-27 Thread Ashish P

I want to convert half width katakana to full width katakana. I tried using
cjk analyzer but not working.
Does cjkAnalyzer do it or is there any other way??
-- 
View this message in context: 
http://www.nabble.com/half-width-katakana-tp23270186p23270186.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: half width katakana

2009-04-27 Thread Ashish P

After this should I be using same cjkAnalyzer or use charFilter??
Thanks,
Ashish


Koji Sekiguchi-2 wrote:
> 
> Ashish P wrote:
>> I want to convert half width katakana to full width katakana. I tried
>> using
>> cjk analyzer but not working.
>> Does cjkAnalyzer do it or is there any other way??
>>   
> 
> CharFilter which comes with trunk/Solr 1.4 just covers this type of
> problem.
> If you are using Solr 1.3, try the patch attached below:
> 
> https://issues.apache.org/jira/browse/SOLR-822
> 
> Koji
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/half-width-katakana-tp23270186p23270453.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: half width katakana

2009-04-28 Thread Ashish P

Koji san,

Using CharStreamAwareCJKTokenizerFactory is giving me following error,
SEVERE: java.lang.ClassCastException: java.io.StringReader cannot be cast to
org.apache.solr.analysis.CharStream

May be you are typecasting Reader to subclass.
Thanks,
Ashish


Koji Sekiguchi-2 wrote:
> 
> If you use CharFilter, you should use "CharStream aware" Tokenizer to 
> correct terms offsets.
> There are two CharStreamAware*Tokenizer in trunk/Solr 1.4.
> Probably you want to use CharStreamAwareCJKTokenizer(Factory).
> 
> Koji
> 
> 
> Ashish P wrote:
>> After this should I be using same cjkAnalyzer or use charFilter??
>> Thanks,
>> Ashish
>>
>>
>> Koji Sekiguchi-2 wrote:
>>   
>>> Ashish P wrote:
>>> 
>>>> I want to convert half width katakana to full width katakana. I tried
>>>> using
>>>> cjk analyzer but not working.
>>>> Does cjkAnalyzer do it or is there any other way??
>>>>   
>>>>   
>>> CharFilter which comes with trunk/Solr 1.4 just covers this type of
>>> problem.
>>> If you are using Solr 1.3, try the patch attached below:
>>>
>>> https://issues.apache.org/jira/browse/SOLR-822
>>>
>>> Koji
>>>
>>>
>>>
>>>
>>> 
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/half-width-katakana-tp23270186p23272475.html
Sent from the Solr - User mailing list archive at Nabble.com.



query clause and filter query

2009-05-19 Thread Ashish P

what is the difference between query clause and filter query??
Thanks,
Ashish
-- 
View this message in context: 
http://www.nabble.com/query-clause-and-filter-query-tp23629715p23629715.html
Sent from the Solr - User mailing list archive at Nabble.com.



lock problem

2009-05-21 Thread Ashish P

Hi, 
The scenario is I have 2 different solr instances running at different
locations concurrently. The data location for both instances is same:
\\hostname\FileServer\CoreTeam\Research\data.
Both instances use  EmbeddedSolrServer and locktype at both instances is
'single'.

I am getting following exception : 
Cannot overwrite: \\hostname\FileServer\CoreTeam\Research\data\index\_1.fdt
at 
org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:64)
at
org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:73)

I tried simple locktype also but it shows timeout exception when writing to
index.
Please help me out..
Thanks,
Ashish


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



solr replication 1.3

2009-05-22 Thread Ashish P

I want to add master slave configuration for solr. I have following solr
configuration:
I am using solr 1.3 on windows. I am also using EmbeddedSolrServer.
In this case is it possible to perform master slave configuration?? 

My second question is if I user solr 1.4 which has solr replication using
java..
Still is it possible to do solr replication using EmbeddedSolrServer on
windows??

Thanks,
Ashish
-- 
View this message in context: 
http://www.nabble.com/solr-replication-1.3-tp23667360p23667360.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: solr replication 1.3

2009-05-23 Thread Ashish P

OK. And the replication available with solr 1.3 is only for unix right??
Thanks,
Ashish


Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> On Fri, May 22, 2009 at 3:12 PM, Ashish P 
> wrote:
>>
>> I want to add master slave configuration for solr. I have following solr
>> configuration:
>> I am using solr 1.3 on windows. I am also using EmbeddedSolrServer.
>> In this case is it possible to perform master slave configuration??
>>
>> My second question is if I user solr 1.4 which has solr replication using
>> java..
>> Still is it possible to do solr replication using EmbeddedSolrServer on
>> windows??
> no . The replication in 1.4 relies on http transport. for an
> EmbeddedSolrServer there is no http end point
>>
>> Thanks,
>> Ashish
>> --
>> View this message in context:
>> http://www.nabble.com/solr-replication-1.3-tp23667360p23667360.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solr-replication-1.3-tp23667360p23690116.html
Sent from the Solr - User mailing list archive at Nabble.com.



commit question

2009-05-25 Thread Ashish P

If I add 10 document to solrServer as in solrServer.addIndex(docs) ( Using
Embedded ) and then I commit and commit fails for for some reason. Then can
I retry this commit lets say after some time or the added documents are
lost??

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



Re: commit question

2009-05-26 Thread Ashish P

Hi,
Any idea if documents from solr server are cleared even if commit fails or I
can still again try commit after some time??
Thanks,
Ashish


Ashish P wrote:
> 
> If I add 10 document to solrServer as in solrServer.addIndex(docs) ( Using
> Embedded ) and then I commit and commit fails for for some reason. Then
> can I retry this commit lets say after some time or the added documents
> are lost??
> 
> 

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



Index replication without HTTP

2009-05-27 Thread Ashish P

Hi,
I have two instances of embedded server (no http) running on a network with
two separate indexes..
I want to replicate changes from one index to other.
Is there any way??
Thanks,
Ashish
-- 
View this message in context: 
http://www.nabble.com/Index-replication-without-HTTP-tp23739156p23739156.html
Sent from the Solr - User mailing list archive at Nabble.com.



lock issue

2009-05-28 Thread Ashish P

Hi,
I am committing to same index from two different embedded servers.
My locktype is simple and writelocktimeout is commitLockTimeout is 10.

I read in a post "Update from multiple JVMs" where Hoss said this case is
supported but I am getting following error. I tried single lock also but
again same error. Is there anything I can do..

SEVERE: java.io.IOException: Cannot overwrite: Z:\index\_2.fdt
at 
org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
at org.apache.lucene.index.FieldsWriter.(FieldsWriter.java:64)
at
org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:73)
at
org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:147)
at
org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:196)
at
org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1405)
at
org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1424)
at
org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1052)
at
org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:750)
at
org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:730)
at
org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1898)
at
org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1875)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:232)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
at
org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateRequestHandler.java:196)
at
org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:123)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
at
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:147)
at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:217)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
at
jp.co.spectrum.insight.core.kcengine.KCIndexHandlerImpl.addIndex(KCIndexHandlerImpl.java:70)
at
jp.co.spectrum.insight.adapter.solr.SearchAdapter4Solr.add(SearchAdapter4Solr.java:175)
at
jp.co.spectrum.insight.core.searchmanager.SearchManagerImpl.appendDocuments(SearchManagerImpl.java:462)
at
jp.co.spectrum.insight.knowledgecenter.KnowledgeCenterManagerImpl$DataAssigner.run(KnowledgeCenterManagerImpl.java:418)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

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



Re: lock issue

2009-05-28 Thread Ashish P

Hi Shalin,
I am trying to do the same point again. You suggested to use HTTP for
replication.
But for performance reasons I want to use embedded. And because replication
is not available with embedded approach, I am trying this i.e. from two
different web applications (same network) using embedded solr giving same
data dir. just trying to index.
Thanks,
Ashish


Shalin Shekhar Mangar wrote:
> 
> On Thu, May 28, 2009 at 2:54 PM, Ashish P 
> wrote:
> 
>>
>> Hi,
>> I am committing to same index from two different embedded servers.
>> My locktype is simple and writelocktimeout is commitLockTimeout is
>> 10.
>>
>> I read in a post "Update from multiple JVMs" where Hoss said this case is
>> supported but I am getting following error. I tried single lock also but
>> again same error. Is there anything I can do..
>>
>>
> One of us has definitely mis-understood Hoss. I don't think you can
> simultaneously write to the same index from two different embedded solr.
> You
> can certainly read from both and you can write from one of them.
> 
> The first email from Hoss said that you can update from two JVMs by
> posting
> requests through http. If you try to write directly to the same index,
> only
> one can do at one time. Simultaneous requests may fail.
> 
> What is the use-case behind this?
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

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



change data dir location

2009-06-11 Thread Ashish P

I want to change data dir location and not use solrConfig.xml. 
So on windows I removed dataDir xonfiguration from solrConfig.xml and tried
setting 'solr.data.dir' system property to my location.
But it looks like solr is not picking up this property on windows.
Anybody experienced the same???
Please share...
Thanks,
Ashish
-- 
View this message in context: 
http://www.nabble.com/change-data-dir-location-tp23992946p23992946.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: change data dir location

2009-06-11 Thread Ashish P

I don't want to set in solrConfig.xml. I want solr to take from my config
file or from system property.
Thanks,
Ashish


Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> set the  value in solrconfig.xml to what you like
> 
> On Fri, Jun 12, 2009 at 10:38 AM, Ashish P
> wrote:
>>
>> I want to change data dir location and not use solrConfig.xml.
>> So on windows I removed dataDir xonfiguration from solrConfig.xml and
>> tried
>> setting 'solr.data.dir' system property to my location.
>> But it looks like solr is not picking up this property on windows.
>> Anybody experienced the same???
>> Please share...
>> Thanks,
>> Ashish
>> --
>> View this message in context:
>> http://www.nabble.com/change-data-dir-location-tp23992946p23992946.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/change-data-dir-location-tp23992946p23993210.html
Sent from the Solr - User mailing list archive at Nabble.com.



complex OR query not working

2009-06-30 Thread Ashish P

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.



Re: Solr relevancy score different on replicated nodes

2019-01-04 Thread Ashish Bisht
Hi Erick, 

I have updated that I am not facing this problem in a new collection. 

As per 3) I can try deleting a replica and adding it again, but the
confusion is which one out of two should I delete.(wondering which replica
is giving correct score for query) 

Both replicas give same number of docs while doing all query.Its strange
that in query explain docCount and docFreq is differing. 

Regards
Ashish



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-01-06 Thread Ashish Bisht
Hi Erick,

Thank you for the details,but doesn't look like a time difference in
autocommit caused this issue.As I said if I do retrieve all query/keyword
query on both server,they returned correct number of docs,its just relevancy
score is taking diff values.  

I waited for brief period,still discrepancy was coming(no indexing also).So
I went ahead deleting the follower node(thinking leader replica should be in
correct state).After adding the new replica again,the issue is not
appearing.

We will monitor same if it appears in future.

Regards
Ashish



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-01-08 Thread Ashish Bisht
Thank you Erick for explaining. 

In my senario, I stopped indexing and updates too and waited for 1 day.
Restarted solr too.Shouldn't both replica and leader come to same state
after this much long period. As you said this gets corrected by segment
merging, hope it is internal process itself and no manual activity required.

For us score matters as we are using it to display some scenarios on search
and it gave changing values.As of now we are dependent of single
shard-replica but in future we might need more replicas
Will planning indexing and updates outside peak query hour help? 

I have tried the exact cache while debugging score difference during
sharding.Didn't help much.Anyhow that's a different topic. 

Thanks again, 

Regards
Ashish Bisht





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-01-11 Thread Ashish Bisht
Hi Erick,

Your statement "*At best, I've seen UIs where they display, say, 1 to 5
stars that are just showing the percentile that the particular doc had
_relative to the max score*"  is something we are trying to achieve,but we
are dealing in percentages rather stars(ratings)

Change in MaxScore per node is messing it.

I was thinking if it possible to make one complete request(for a term) go
though one replica,i.e if to the client we could tell which replica hit the
first request and subsequently further paginated requests should go though
that replica until keyword is changed.Do you think it is possible or a good
idea?If yes is there a way in solr to know which replica served request?

Regards
Ashish




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-01-29 Thread Ashish Bisht
Hi Erick,

To test this scenario I added replica again and from few days have been
monitoring metrics like Num Docs, Max Doc, Deleted Docs from *Overview*
section of core.Checked *Segments Info* section too.Everything looks in
sync.

http://:8983/solr/#/MyTestCollection_*shard1_replica_n7*/
http://:8983/solr/#/MyTestCollection_*4_shard1_replica_n7*/

If in future they go out of sync,just wanted to confirm if this is a bug
although you mentioned as

*bq. Shouldn't both replica and leader come to same state 
after this much long period. 

No. After that long, the docs will be the same, all the docs 
present on one replica will be present and searchable on 
the other. However, they will be in different segments so the 
"stats skew" will remain. *


We need these score,so as a temporary solution if we monitor these metrics
for any issues and take action (either optimize or delete-add replica)
accordingly.Does it make sense?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-01-29 Thread Ashish Bisht
Hi Erick, 

Our business wanted score not to be totally based on default relevancy algo.
Instead a mix of solr relevancy+usermetrics(80%+20%). 

Each result doc is calculated against max score as a fraction of
80.Remaining 20 is from user metrics. 

Finally sort happens on new score. 

But say we got first page correctly, and for the second page if the request
goes to other replica where max score is different. UI may result give wrong
sort as compared to first page. For e.g last value of page 1 is 70 and first
value of second page can be 72 I. e distorted sorting. 

On top of it we are not using pagination but a infinite scroll which makes
it more noticeable. 

Please suggest. 

Regards
Ashish








--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Solr relevancy score different on replicated nodes

2019-02-03 Thread Ashish Bisht
Thanks Erick and everyone.We are checking on stats cache.

I noticed stats skew again and optimized the index to correct the same.As
per the documents.

https://lucidworks.com/2017/10/13/segment-merging-deleted-documents-optimize-may-bad/
and 
https://lucidworks.com/2018/06/20/solr-and-optimizing-your-index-take-ii/

wanted to check on below points considering we want stats skew to be
corrected.

1.When optimized single segment won't be natural merged easily.As we might
be doing manual optimize every time,what I visualize is at a certain point
in future we might be having a single large segment.What impact this large
segment is going to have?
Our index ~30k documents i.e files with content(Segment size <1Gb as of now)

1.Do you recommend going for optimize in these situations?Probably it will
be done only when stats skew.Is it safe?

Regards
Ashish

 




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Relevancy Score Calculation

2019-02-03 Thread Ashish Bisht
Hi,

Currently score is calculated based on "Max Doc"  instead of "Num Docs".Is
it possible to change it to "Num Docs"(i.e without deleted docs).Will it
require a code change or some config change.

Regards
Ashish



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Relevancy Score Calculation

2019-02-11 Thread Ashish Bisht
Thanks.I Agree.

Regards
Ashish



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Spellchecker -File based vs Index based

2019-03-17 Thread Ashish Bisht
Hi,

I am seeing difference in file based spellcheck and index based spellcheck
implementations.

Using index based
http://:8983/solr/SCSpell/spell?q=*intnet of
things*&defType=edismax&qf=spellcontent&wt=json&rows=0&spellcheck=true&spellcheck.dictionary=*default*&q.op=AND


  "suggestions":[
  "intnet",{
"numFound":10,
"startOffset":0,
"endOffset":6,
"origFreq


Suggestion get build up only for wrong word.


But while suing file based,they get build up for right words too which
messes collations

http://:8983/solr/SCSpell/spell?q=intnet%20of%20things&defType=edismax&qf=spellcontent&wt=json&rows=0&&spellcheck=true&spellcheck.dictionary=*file*&q.op=AND

 "suggestion":["*internet*",
  "contnet",
  "intel",
  "intent",
  "intert",
  "intelect",
  "intended",
  "intented",
  "interest",
  "botnets"]},
  "*of*",{
"numFound":8,
"startOffset":7,
"endOffset":9,
"suggestion":["ofc",
  "off",
  "ohf",
 .
  "soft"]},
 "*things*",{
"numFound":10,
"startOffset":10,
"endOffset":16,
"suggestion":["thing",
  "brings",
  "think",
  "thinkers",
  .



Is there any property in file based which I use to fix this



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Different behavior when using function queries

2019-03-18 Thread Ashish Bisht
Can someone please explain the below behavior.For different q parameter
function query response differs although function queries are same

http://:8983/solr/SCSpell/select?q="*market
place*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=internet_of_things:if(exists(query({!edismax
v='"internet of
things"'})),true,false),instant_of_things:if(exists(query({!edismax
v='"instant of things"'})),true,false)

Response contains function query results

 "response":{"numFound":80,"start":0,"docs":[
  {
"internet_of_things":false,
"instant_of_things":false}]
  }}

wheras for different q

http://:8983/solr/SCSpell/select?q="*intent of
things*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=internet_of_things:if(exists(query({!edismax
v='"internet of
things"'})),true,false),instant_of_things:if(exists(query({!edismax
v='"instant of things"'})),true,false)

Response doesnot contain function query results
  
"response":{"numFound":0,"start":0,"docs":[]
  }}


>From the results it looks like if the results of q doesn't yield result
function queries don't work.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Behavior of Function Query

2019-03-18 Thread Ashish Bisht
Please see the below requests and response

http://Sol:8983/solr/SCSpell/select?q="*internet of
things*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=score,internet_of_things:query({!edismax
v='"*internet of things*"'}),instant_of_things:query({!edismax v='"instant
of things"'})


Response contains score from function query

 "fl":"score,internet_of_things:query({!edismax v='\"internet of
things\"'}),instant_of_things:query({!edismax v='\"instant of things\"'})",
  "rows":"1",
  "wt":"json"}},
  "response":{"numFound":851,"start":0,"maxScore":7.6176834,"docs":[
  {
"score":7.6176834,
   * "internet_of_things":7.6176834*}]
  }}


But if in the same request q is changed,it doesn't give score

http://Sol-1:8983/solr/SCSpell/select?q="*wall
street*"&defType=edismax&qf=spellcontent&wt=json&rows=1&fl=score,internet_of_things:query({!edismax
v='"*internet of things*"'}),instant_of_things:query({!edismax v='"instant
of things"'})

   "q":"\"wall street\"",
  "defType":"edismax",
  "qf":"spellcontent",
  "fl":"score,internet_of_things:query({!edismax v='\"internet of
things\"'}),instant_of_things:query({!edismax v='\"instant of things\"'})",
  "rows":"1",
  "wt":"json"}},
  "response":{"numFound":46,"start":0,"maxScore":15.670144,"docs":[
  {
"score":15.670144}]
  }}


Why score of function query is getting applied when q is a different.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Spellchecker -File based vs Index based

2019-03-19 Thread Ashish Bisht
Spellcheck configuration is default one.. 


solr.FileBasedSpellChecker
file
spellings.txt
UTF-8
./spellcheckerFile




  default
  jkdefault
  file
  on
  true
  10
  5
  5
  true
  10
  true
  10
  5


Also the words are present in the file..For e.g things word which is
corrected is present inside file.Also the suggestions related to it are
present. 

*I don't want suggestions for right word (of,things)..Any problem with
request .Tried two combinations.* 

1./spell?spellcheck.q=intnet of
things&spellcheck=true&spellcheck.collateParam.q.op=AND&df=spellcontent&spellcheck.dictionary=file
 

2./spell?q=intnet of
things&defType=edismax&qf=spellcontent&wt=json&rows=0&&spellcheck=true&spellcheck.dictionary=file&q.op=AND
 

Please suggest



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Spellchecker -File based vs Index based

2019-03-19 Thread Ashish Bisht
Spellcheck configuration is default one..


solr.FileBasedSpellChecker
file
spellings.txt
UTF-8
./spellcheckerFile




  default
  jkdefault
  file
  on
  true
  10
  5
  5
  true
  10
  true
  10
  5


Also the words are present in the file..For e.g things word which is
corrected is present inside file.Also the suggestions related to it are
present.

I don't want suggestions for right word (of,things)..Any problem with
request .Tried two combinations.

1./spell?spellcheck.q=intnet of
things&spellcheck=true&spellcheck.collateParam.q.op=AND&df=spellcontent&spellcheck.dictionary=file

2.spell?q=intnet of
things&defType=edismax&qf=spellcontent&wt=json&rows=0&&spellcheck=true&spellcheck.dictionary=file&q.op=AND

Please suggest



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Stopwords param of edismax parser not working

2019-03-28 Thread Ashish Bisht
Hi,

We are trying  to remove stopwords from analysis using edismax parser
parameter.The documentation says

*stopwords
A Boolean parameter indicating if the StopFilterFactory configured in the
query analyzer should be respected when parsing the query. If this is set to
false, then the StopFilterFactory in the query analyzer is ignored.*

https://lucene.apache.org/solr/guide/7_3/the-extended-dismax-query-parser.html


But seems like its not working.

http://Box-1:8983/solr/SalesCentralDev_4/select?q=internet of
things&rows=0&defType=edismax&qf=search_field
content*&stopwords=false*&debug=true


"parsedquery":"+(DisjunctionMaxQuery((content:internet |
search_field:internet)) DisjunctionMaxQuery((content:thing |
search_field:thing)))",
  *  "parsedquery_toString":"+((content:internet | search_field:internet)
(content:thing | search_field:thing))",*


Are we missing something here?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Spellcheck Collations Phrase based instead of AND

2019-05-13 Thread Ashish Bisht
Hi,


For a sample collation during spellcheck.

 "collation",{
"collationQuery":"smart connected factory",
"hits":109,
"misspellingsAndCorrections":[
  "smart","smart",
  "connected","connected",
  "fator","factory"]},
  "collation",{
"collationQuery":"smart connected faster",
"hits":325,
"misspellingsAndCorrections":[
  "smart","smart",
  "connected","connected",
  "fator","faster"]},
  "collation",{
"collationQuery":"sparc connected factory",
"hits":14,
"misspellingsAndCorrections":[
  "smart","sparc",
  "connected","connected",
  "fator","factory"]},

The hits in the collationQuery are based on AND between the keyword .

Is it possible to get the collations sorted based on phrase instead of AND

Regards
Ashish



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


StopWords behavior with phrases

2019-05-21 Thread Ashish Bisht
Hi,

We make query to solr as below

*q="market and cloud" OR (market and cloud)&q.op=AND&deftype=edismax*

Our intent to look for results with both phrase match and AND query together
where solr itself takes care of relevancy.

But due to presence of stopword in phrase query a gap is left which gives
different results as against a keyword "market cloud".

"parsedquery_toString":"+(+(content:\"market ? cloud\" |
search_field:\"market ? cloud\"))",

There are suggestion that for phrase query create a separate field with no
stopword,But then we'll not be able to achieve both phrase and AND in a
single request.

Is there anyway ? can be removed from phrase or any suggestion for our
requirement.

Please suggest

Regards
Ashish





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Exception while adding data in multiple threads

2019-07-18 Thread Ashish Athavale
Hi,

I am getting below exception while adding data into solr. I am adding data 
concurrently in 20 threads, 100 documents in a batch per thread.
Each documents contains 40 fields and all are indexed.
This issue occurs only when I add in multi threads.

Can you please help out here?

Caused by: 
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error 
from server at http://10.88.66.154:8983/solr: Invalid version (expected 2, but 
95) or the data in not in 'javabin' format
at 
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643)
at 
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)
at 
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)
at 
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:194)
at 
org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106)
at 
org.springframework.data.solr.core.SolrTemplate.lambda$saveBeans$3(SolrTemplate.java:227)
at 
org.springframework.data.solr.core.SolrTemplate$$Lambda$649/753427667.doInSolr(Unknown
 Source)
at 
org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:167)

Regards
Ashish Athavale | Architect
ashish_athav...@persistent.com<mailto:ashish_athav...@persistent.com>| Cell: 
+91-9881137580| Tel: +91-02067034708
Persistent Systems Ltd. |  www.persistent.com<http://www.persistent.com>

DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.


Indexing a Multivalued field using ContentStreamUpdateRequest in Solr

2015-02-19 Thread Ashish Vishwas Kaduskar
Hello,



I use below code snippet to index data from a text file into solr. My text data 
is a tsv file with 3 fields - id,title and types. The field "types" is a 
multivalued field and these values are available as comma separated in the text 
file itself.
Here is an example: 123 building house,skyscraper,hut

id is 123 title is building types is house,skyscraper,hut

How do I modify my code to store types as a multivalued field in Solr?

  HttpSolrServer server = new HttpSolrServer("/my/solr/home");

  ModifiableSolrParams solrparams = new ModifiableSolrParams(new 
ModifiableSolrParams());

  solrparams.set("fieldnames", "id,title,types");

  ContentStreamUpdateRequest request = new 
ContentStreamUpdateRequest("/update");

  request.setParams(params);

  ContentStream readFile = new ContentStreamBase.FileStream(new 
File("myFile.txt"));

  request.addContentStream(readFile);

  SolrResponseBase response = null;

  try {

response = (SolrResponseBase) request.process(server);

  }catch(Exception e){

  e.printStackTrace();

  }


Regards,
Ashish

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are 
not
to copy, disclose, or distribute this e-mail or its contents to any other 
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken
every reasonable precaution to minimize this risk, but is not liable for any 
damage
you may sustain as a result of any virus in this e-mail. You should carry out 
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this 
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


Delete solr data from disk space

2009-08-04 Thread Ashish Kumar Srivastava

I am facing a problem in deleting solr data form disk space.
I had 80Gb of of solr data. I deleted 30% of these data by using query in
solr-php client and committed.
Now deleted data is not visible from the solr UI but used disk space is
still 80Gb for solr data.
Please reply if you have any solution to free the disk space after deleting
some solr data.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24808676.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete solr data from disk space

2009-08-04 Thread Ashish Kumar Srivastava

Sorry!! But this solution will not work because I deleted data by certain
query.
Then how can i know which files should be deleted. I cant delete whole data.
-- 
View this message in context: 
http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24808868.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete solr data from disk space

2009-08-04 Thread Ashish Kumar Srivastava

Hi ,


Sorry!! But this solution will not work because I deleted data by certain
query.
Then how can i know which files should be deleted. I cant delete whole data.



Markus Jelsma - Buyways B.V. wrote:
> 
> Hello,
> 
> 
> A rigorous but quite effective method is manually deleting the files in
> your SOLR_HOME/data directory and reindex the documents you want. This
> will surely free some diskspace.
> 
> 
> 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-08-04 at 06:26 -0700, Ashish Kumar Srivastava wrote:
> 
>> I am facing a problem in deleting solr data form disk space.
>> I had 80Gb of of solr data. I deleted 30% of these data by using query in
>> solr-php client and committed.
>> Now deleted data is not visible from the solr UI but used disk space is
>> still 80Gb for solr data.
>> Please reply if you have any solution to free the disk space after
>> deleting
>> some solr data.
>> 
>> Thanks in advance.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24808883.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete solr data from disk space

2009-08-04 Thread Ashish Kumar Srivastava

Hi Toby,

Thanks but i have tried this solution earlier but the problem with this
solution is that
it is taking too much disk space for optimization(more than two times of
originally index data size)
Do you have any better solution or any other option by which we can use
optimize without using too much space.

Thanks 
Ashish




Toby Cole-2 wrote:
> 
> Hi Anish,
>   Have you optimized your index?
> When you delete documents in lucene they are simply marked as  
> 'deleted', they aren't physically removed from the disk.
> To get the disk space back you must run an optimize, which re-writes  
> the index out to disk without the deleted documents, then deletes the  
> original.
> 
> Toby
> 
> On 4 Aug 2009, at 14:41, Ashish Kumar Srivastava wrote:
> 
>>
>> Hi ,
>>
>>
>> Sorry!! But this solution will not work because I deleted data by  
>> certain
>> query.
>> Then how can i know which files should be deleted. I cant delete  
>> whole data.
>>
>>
>>
>> Markus Jelsma - Buyways B.V. wrote:
>>>
>>> Hello,
>>>
>>>
>>> A rigorous but quite effective method is manually deleting the  
>>> files in
>>> your SOLR_HOME/data directory and reindex the documents you want.  
>>> This
>>> will surely free some diskspace.
>>>
>>>
>>> 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-08-04 at 06:26 -0700, Ashish Kumar Srivastava wrote:
>>>
>>>> I am facing a problem in deleting solr data form disk space.
>>>> I had 80Gb of of solr data. I deleted 30% of these data by using  
>>>> query in
>>>> solr-php client and committed.
>>>> Now deleted data is not visible from the solr UI but used disk  
>>>> space is
>>>> still 80Gb for solr data.
>>>> Please reply if you have any solution to free the disk space after
>>>> deleting
>>>> some solr data.
>>>>
>>>> Thanks in advance.
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24808883.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 
> 
> --
> Toby Cole
> Software Engineer, Semantico Limited
> Registered in England and Wales no. 03841410, VAT no. GB-744614334.
> Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.
> 
> Check out all our latest news and thinking on the Discovery blog
> http://blogs.semantico.com/discovery-blog/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24821241.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete solr data from disk space

2009-08-04 Thread Ashish Kumar Srivastava

Hi Toby,

Thanks for the reply, But i have tried this solution earlier but the problem
with this solution is that
it is taking too much disk space for optimization(more than two times of
originally index data size)
Do you have any better solution or any other option by which we can use
optimize without using too much space.

Thanks
Ashish 



Toby Cole-2 wrote:
> 
> Hi Anish,
>   Have you optimized your index?
> When you delete documents in lucene they are simply marked as  
> 'deleted', they aren't physically removed from the disk.
> To get the disk space back you must run an optimize, which re-writes  
> the index out to disk without the deleted documents, then deletes the  
> original.
> 
> Toby
> 
> On 4 Aug 2009, at 14:41, Ashish Kumar Srivastava wrote:
> 
>>
>> Hi ,
>>
>>
>> Sorry!! But this solution will not work because I deleted data by  
>> certain
>> query.
>> Then how can i know which files should be deleted. I cant delete  
>> whole data.
>>
>>
>>
>> Markus Jelsma - Buyways B.V. wrote:
>>>
>>> Hello,
>>>
>>>
>>> A rigorous but quite effective method is manually deleting the  
>>> files in
>>> your SOLR_HOME/data directory and reindex the documents you want.  
>>> This
>>> will surely free some diskspace.
>>>
>>>
>>> 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-08-04 at 06:26 -0700, Ashish Kumar Srivastava wrote:
>>>
>>>> I am facing a problem in deleting solr data form disk space.
>>>> I had 80Gb of of solr data. I deleted 30% of these data by using  
>>>> query in
>>>> solr-php client and committed.
>>>> Now deleted data is not visible from the solr UI but used disk  
>>>> space is
>>>> still 80Gb for solr data.
>>>> Please reply if you have any solution to free the disk space after
>>>> deleting
>>>> some solr data.
>>>>
>>>> Thanks in advance.
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24808883.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 
> 
> --
> Toby Cole
> Software Engineer, Semantico Limited
> Registered in England and Wales no. 03841410, VAT no. GB-744614334.
> Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.
> 
> Check out all our latest news and thinking on the Discovery blog
> http://blogs.semantico.com/discovery-blog/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Delete-solr-data-from-disk-space-tp24808676p24821271.html
Sent from the Solr - User mailing list archive at Nabble.com.