What are the Unicode encodings supported by Solr?

2009-05-06 Thread KK
Hi,
I'd like to know about the different Unicode[/any other?] encodings
supported by Solr for posting docs [thru Solrj in my case]. Is it that just
UTF-8, UCN  supported or other character encodings like NCR(decimal),
NCR(hex) etc are supported as well?
Now the problem is that during automating the crawling and indexing process
for Solr I found that for most of the pages the encoding is UTF-8[in this
case searching works fine] but for others the encoding is some other
character encoding[like NCR(dec), NCR(hex) or might be something else, don't
have much idea on this]. So when I fetch the page content thru java methods
using InputSteamReaders and after stripping various tags what I obtained is
raw text with some encoding not getting supported by Solr. So either I've to
confing Solr to support these other encodings as well[only if it is
possible] otherwise convert whatever is the raw text to UTF-8 using some
standard encoders[this solution seems better to me, provided I'm able to
detect the encoding for input]. I'd like to know if there are some standard
encoders are available for this purpose[must be right? din't google much].
Any advice on this is highly appreciated.

An off-beat Q:
In some of the pages I'm getting some \ufffd chars which I think is some
sort of unmappable[by Java?] character, right?. Any idea on how to handle
this? Just replacing with blank char will not do [this depends on the
requirement, though].


Thanks,
KK.


Phrase matching on a text field

2009-05-06 Thread Phil Chadwick
Hi,

I'm trying to figure out why phrase matching on a text field only works
some of the time.

I have a SOLR index containing a document titled "FUTURE DIRECTIONS FOR
INTEGRATED CATCHMENT".  The "FOR" seems to be causing a problem...

The title field is indexed as both s_title and t_title (string and text,
as defined in the demo schema), thus:







I can match the document with an exact query on the string:

q=s_title:"FUTURE DIRECTIONS FOR INTEGRATED CATCHMENT"

I can match the document with this phrase query on the text:

q=t_title:"future directions"

which uses the parsedquery shown by "&debugQuery=true":

t_title:"future directions"
t_title:"future directions"
PhraseQuery(t_title:"futur direct")
t_title:"futur direct"

Similarly, I can match the document with this query:

q=t_title:"integrated catchment"

which uses the parsedquery shown by "&debugQuery=true":

t_title:"integrated catchment"
t_title:"integrated catchment"
PhraseQuery(t_title:"integr catchment")
t_title:"integr catchment"

But I can not match the document with the query:

q=t_title:"future directions for integrated catchment"

which uses the phrase query shown by "&debugQuery=true":


t_title:"future directions for integrated catchment"

t_title:"future directions for integrated catchment"

PhraseQuery(t_title:"futur direct integr catchment")

t_title:"futur direct integr catchment"

Any wisdom gratefully accepted.

Cheers,


-- 
Phil

640K ought to be enough for anybody.
-- Bill Gates, in 1981


Re: Using Solr to index a database

2009-05-06 Thread Amit Nithian
Each PRODUCT would be a document in your index with fields number, name and
price. If you wanted to start off simple, your schema.xml could just define
these three fields; however, for a search index, you may want to index name
several ways (i.e. with and without stop words etc).

The DIH is intelligent enough to know what DB columns map to what schema
fields so you don't have to add unnecessary  elements to the
data-config.xml.

Your query would be "select * from products" and the delta query would only
select those products that have been changed or updated since some previous
date (a bit tangential to this discussion).

HTH,
Amit

On Wed, May 6, 2009 at 2:46 AM, uday kumar maddigatla  wrote:

>
> Hi
>
> I too having the same doubt. I would like to check How Solr is index and
> search the data which is there in database.
>
>  For example, lets say we have a table called PRODUCTS, and within that
> table, we have the following columns:
> NUMBER (product number)
> NAME (product name)
> PRICE
>
> How would weindex all this information? Here is an example (from the links
> you provided) of xml (data-config.xml)
> --->deltaQuery="select id from item where last_modified >
> '${dataimporter.last_index_time}'">
>
>
>
>
> Need Help in this.
>
>
>
>
> Noble Paul നോബിള്‍  नोब्ळ् wrote:
> >
> > delta query is for incremental imports
> >
> > us ethe  'query' attribute to import data
> >
> >
> > On Tue, Apr 21, 2009 at 7:35 PM, ahammad  wrote:
> >>
> >> Thanks for the link...
> >>
> >> I'm still a bit unclear as to how it goes. For example, lets say i have
> a
> >> table called PRODUCTS, and within that table, I have the following
> >> columns:
> >> NUMBER (product number)
> >> NAME (product name)
> >> PRICE
> >>
> >> How would I index all this information? Here is an example (from the
> >> links
> >> you provided) of xml that confuses me:
> >>
> >> >>--->deltaQuery="select id from item where last_modified >
> >> '${dataimporter.last_index_time}'">
> >>
> >>
> >>
> >>
> >> What is that deltaQuery (or even if it was a regular "query" expression)
> >> line for? It seems to me like a sort of filter. What if I don't want to
> >> filter anything and just want to index all the rows?
> >>
> >> Cheers
> >>
> >>
> >>
> >>
> >> Noble Paul നോബിള്‍  नोब्ळ् wrote:
> >>>
> >>> On Mon, Apr 20, 2009 at 7:15 PM, ahammad 
> wrote:
> 
>  Hello,
> 
>  I've never used Solr before, but I believe that it will suit my
> current
>  needs with indexing information from a database.
> 
>  I downloaded and extracted Solr 1.3 to play around with it. I've been
>  looking at the following tutorials:
> 
> http://www.ibm.com/developerworks/java/library/j-solr-update/index.html
> 
> http://www.ibm.com/developerworks/java/library/j-solr-update/index.html
>  http://wiki.apache.org/solr/DataImportHandler
>  http://wiki.apache.org/solr/DataImportHandler
> 
>  There are a few things I don't understand. For example, the IBM
> article
>  sometimes refers to directories that aren't there, or a little
>  different
>  from what I have in my extracted copy of Solr (ie
>  solr-dw/rss/conf/solrconfig.xml). I tried to follow the steps as best
> I
>  can,
>  but as soon as I put the following in solrconfig.xml, the whole thing
>  breaks:
> 
>     class="org.apache.solr.handler.dataimport.DataImportHandler">
>  
>   rss-data-config.xml
>  
>  
> 
>  Obviously I replace with my own info...One thing I don't quite get is
>  the
>  data-config.xml file. What exactly is it? I've seen examples of what
> it
>  contains but since I don't know enough, I couldn't really adjust it.
> In
>  any
>  case, this is the error I get, which may be because of a misconfigured
>  data-config.xml...
> >>> the data-config.xml describes how to fetch data from various data
> >>> sources and index them into Solr.
> >>>
> >>> The stacktrace says that your xml is invalid.
> >>>
> >>> The best bet is to take one of the sample dataconfig xml files and make
> >>> changes.
> >>>
> >>>
> http://svn.apache.org/viewvc/lucene/solr/trunk/example/example-DIH/solr/db/conf/db-data-config.xml?revision=691151&view=markup
> >>>
> >>>
> http://svn.apache.org/viewvc/lucene/solr/trunk/example/example-DIH/solr/rss/conf/rss-data-config.xml?revision=691151&view=markup
> >>>
> >>>
> 
>  org.apache.solr.handler.dataimport.DataImportHandlerException:
>  Exception
>  occurred while initializing context at
> 
> org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:165)
>  at
> 
> org.apache.solr.handler.dataimport.DataImporter.(DataImporter.java:99)
>  at
> 
> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:96)
>  at
> 
> org.apache.solr.core.SolrResourceLoad

RE: Solrconfig.xml

2009-05-06 Thread Francis Yakin

No error, attached is solrconfig.xml files( one is from 1.2.0 that works and 
the other is 1.3.0 that doesn't work)

Thanks in advance.

Francis


-Original Message-
From: Grant Ingersoll [mailto:gsing...@apache.org]
Sent: Wednesday, May 06, 2009 4:56 PM
To: solr-user@lucene.apache.org
Subject: Re: Solrconfig.xml

Is there an error in the logs?

On May 6, 2009, at 2:12 PM, Francis Yakin wrote:

>
> I just upgraded from 1.2.0 to 1.3.0 of solr.
> We have an existing data/index that I will be using from 1.2.0 to
> 1.3.0 and I use the default solrconfig.xml that come from 1.3.0.
>
> For some reason when I used solrconfig.xml from 1.2.0 it works and I
> can see the index and data, but I used solrconfig.xml from 1.3.0 I
> don't see the data and index.
>
> What did I do wrong?
>
> Thanks
>
> Francis
>
>

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

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



Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Avlesh Singh
How about this -
Lets say your domain objects had these three things you care about - P1, D
and P2 (P1 is the price valid before D and P2 after this date).
Index each such document twice (Please don't kill me for suggesting this).
There are two fields which you should index with the document - epoch and
price. One document has a value D in the epoch field and price P1. The other
document would have a value (D+1) in the epoch field and P2 in the price
field.

I am assuming, that all your queries to this index have a filterQuery
appended to it, always. So for any given date that you want to query on, you
can add a filter query (epoch lt incomingDate) to your query. This will make
sure you always get just one document of the two that has been indexed.

Other than doubling your index size, is there something fundamentally wrong
with this design?
More importantly, does this work?

Cheers
Avlesh

On Thu, May 7, 2009 at 6:15 AM, Yonik Seeley wrote:

> On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram 
> wrote:
> > Basically, a product has two price values and a date, the product
> > effectively has one price before the date and the other one after.
> > This poses no problem for the site itself since I can use conditional
> > logic, but I have no idea how to approach this with regards to solr
> > queries.
> >
> > The price of a product is used for both faceting and sorting and
> > should use whichever price is active at the time of the query. Is
> > there any way to do define a field whose value is a simple algorithm
> > operating on the value of other fields?
>
> Sort of - function queries.
>
> We don't have any conditional function queries yet, but that's easy.
> You can't yet sort by a function query, but we should fix that.
> You can't yet facet on a function query, but we should fix that too.
>
> Short term, Erick's index the doc twice idea may be best.
> Long term, out-of-the-box functionality after volunteers help develop
> out the function query approach :-)
>
> -Yonik
> http://www.lucidimagination.com
>


Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
On Thu, May 7, 2009 at 6:15 AM, Yonik Seeley  wrote:
> On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram  wrote:
>> Basically, a product has two price values and a date, the product
>> effectively has one price before the date and the other one after.
>> This poses no problem for the site itself since I can use conditional
>> logic, but I have no idea how to approach this with regards to solr
>> queries.
>>
>> The price of a product is used for both faceting and sorting and
>> should use whichever price is active at the time of the query. Is
>> there any way to do define a field whose value is a simple algorithm
>> operating on the value of other fields?
>
> Sort of - function queries.
>
> We don't have any conditional function queries yet, but that's easy.
> You can't yet sort by a function query, but we should fix that.
> You can't yet facet on a function query, but we should fix that too.

+1 we should fix this
>
> Short term, Erick's index the doc twice idea may be best.
> Long term, out-of-the-box functionality after volunteers help develop
> out the function query approach :-)

Ericks's idea is the simplest for now. Good one
>
> -Yonik
> http://www.lucidimagination.com
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: When should I

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
it is wise to optimize the index once in a while (daily may be). But
it depends on how many commits you do in a day. Every commit causes
fragmentation of index files and your search can become slow if you do
not optimize it.

But optimizing always is not recommended because it is time consuming
and your replication (if it is a master slave setup) can take longer

.
if you do a delete all then do an optimize anyway

On Wed, May 6, 2009 at 9:18 PM, Eric Sabourin
 wrote:
> Is the optimize xml command something which is only required when I delete
> all the docs?
> Or should I also send the optimize command following other operations? or
> daily?
>
> Thanks...
> Eric
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
going forward the java based replication is going to be the preferred
means replicating index. It does not support replicating files in the
dataDir , it only supports replicating index files and conf files
(files in conf dir). I was unaware of the fact that it was possible to
put the elevate.xml in dataDir.

reloading on commit is a trivial for a search component. it can
register itself to be an even listener for commit and do a reload of
elevate.xml. This can be a configuration parameter.

true





On Wed, May 6, 2009 at 7:08 PM, Nicolas Pastorino  wrote:
>
> On May 6, 2009, at 15:17 , Noble Paul നോബിള്‍ नोब्ळ् wrote:
>
>> Why would you want to write it to the data dir? why can't it be in the
>> same place (conf) ?
>
> Well, fact is that the QueryElevationComponent loads the configuration file
> ( elevate.xml ) either from the data dir, either from the conf dir.
> Which means that existing setups using this component maybe using either
> location.
> That is the only reason why i judged necessary to keep supporting this
> "flexibility".
>
> But this could be simplified, forcing the elevate.xml file to be in the conf
> dir, and having a system ( the one you proposed, or the request handler
> attached to the issue ) to reload the configuration from the conf dir (
> which is currently not possible. While when elevate.xml is stored in the
> dataDir, triggering a commit would reload it ).
> I was just unsure about all ins and outs of the Elevation system, and then
> did not remove this flexibility.
>
> Thanks for your expert eye on this !
>
>
>> On Wed, May 6, 2009 at 6:43 PM, Nicolas Pastorino  wrote:
>>>
>>> Hello,
>>>
>>> On May 6, 2009, at 15:02 , Noble Paul നോബിള്‍ नोब्ळ् wrote:
>>>
 The elevate.xml is loaded from conf dir when the core is reloaded . if
 you post the new xml you will have to reload the core.

 A simple solution would be to write a RequestHandler which extends
 QueryElevationComponent which can be a listener for commit and call an
 super.inform() on that event
>>>
>>> You may want to have a look at this issue :
>>> https://issues.apache.org/jira/browse/SOLR-1147
>>> The proposed solution ( new request handler, attached to the ticket ),
>>> solves the issue in both cases :
>>> * when elevate.xml is in the DataDir.
>>> * when elevate.xml is in the conf dir.
>>>
>>> Basically this new request handler receives, as XML, the new
>>> configuration,
>>> writes it to the right place ( some logic was copied from the
>>> QueryElevationComponent.inform() code ), and then calls the inform()
>>> method
>>> on the QueryElevationComponent for the current core, as you suggested
>>> above,
>>> to reload the Elevate configuration.
>>> --
>>> Nicolas
>>>
>>>
 On Fri, Apr 10, 2009 at 5:18 PM, Nicolas Pastorino  wrote:
>
> Hello !
>
>
> Browsing the mailing-list's archives did not help me find the answer,
> hence
> the question asked directly here.
>
> Some context first :
> Integrating Solr with a CMS ( eZ Publish ), we chose to support
> Elevation.
> The idea is to be able to 'elevate' any object from the CMS. This can
> be
> achieved through eZ Publish's back office, with a dedicated Elevate
> administration GUI, the configuration is stored in the CMS temporarily,
> and
> then synchronized frequently and/or on demand onto Solr. This
> synchronisation is currently done as follows :
> 1. Generate the elevate.xml based on the stored configuration
> 2. Replace elevate.xml in Solr's dataDir
> 3. Commit. It appears that when having elevate.xml in Solr's dataDir,
> and
> solely in this case, commiting triggers a reload of elevate.xml. This
> does
> not happen when elevate.xml is stored in Solr's conf dir.
>
>
> This method has one main issue though : eZ Publish needs to have access
> to
> the same filesystem as the one on which Solr's dataDir is stored. This
> is
> not always the case when the CMS is clustered for instance --> show
> stopper
> :(
>
> Hence the following idea / RFC :
> How about extending the Query Elevation system with the possibility to
> push
> an updated elevate.xml file/XML through HTTP ?
> This would update the file where it is actually located, and trigger a
> reload of the configuration.
> Not being very knowledgeable about Solr's API ( yet ! ), i cannot
> figure
> out
> whether this would be possible, how this would be achievable ( which
> type
> of
> plugin for instance ) or even be valid ?
>
> Thanks a lot in advance for your thoughts,
> --
> Nicolas
>
>
>
>



 --
 -
 Noble Paul | Principal Engineer| AOL | http://aol.com
>>>
>>> --
>>> Nicolas Pastorino
>>> Consultant - Trainer - System Developer
>>> Phone :  +33 (0)4.78.37.01.34
>>> eZ Systems ( Western Europe )  |

Re: deltaImportQuery in child entity

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
yeah the behavior you are observing is right. Now I have second
thoughts on how it should be. I guess , if the deltaImportQuery is
present in a child entity it should be used. you can open an issue

--Noble

On Thu, May 7, 2009 at 12:33 AM, Martin Davidsson
 wrote:
> Hello, I have a data-config.xml that is structured in the following fashion:
>
> 
>    deltaImportQuery="deltaParentImportQuery" deltaQuery="deltaParentQuery">
>       deltaImportQuery="deltaChildImportQuery" />
>   
> 
>
> Is the deltaImportQuery attribute even allowed on the child entity? The
> behavior I'm seeing is that when I issue a delta-import command, Solr uses
> the deltaParentImportQuery and deltaParentQuery from the parent entity but
> the fullChildQuery from the child entity. I was hoping it would use the
> deltaChildImportQuery on the child entity to figure out what data to use in
> the case of a delta-import. Is the behavior I'm seeing expected? Is it
> possible to write data-config.xml in a way that I can use different queries
> to pull in the field data for a child entity depending on whether I'm doing
> a full- or delta-import? I'm using the nightly build from March 24, 2009.
> Thanks!
>
> -- Martin Davidsson
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Yonik Seeley
On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram  wrote:
> Basically, a product has two price values and a date, the product
> effectively has one price before the date and the other one after.
> This poses no problem for the site itself since I can use conditional
> logic, but I have no idea how to approach this with regards to solr
> queries.
>
> The price of a product is used for both faceting and sorting and
> should use whichever price is active at the time of the query. Is
> there any way to do define a field whose value is a simple algorithm
> operating on the value of other fields?

Sort of - function queries.

We don't have any conditional function queries yet, but that's easy.
You can't yet sort by a function query, but we should fix that.
You can't yet facet on a function query, but we should fix that too.

Short term, Erick's index the doc twice idea may be best.
Long term, out-of-the-box functionality after volunteers help develop
out the function query approach :-)

-Yonik
http://www.lucidimagination.com


Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Andrew Ingram

Hi Grant,

The problem is that even if we're only displaying 16 products at a time, 
we're potentially sorting over a collection of thousands. This means 
it's pretty essential for the ordering from solr to be correct.


- Andy

Grant Ingersoll wrote:

WARNING: Low level Solr hacking and brainstorming:
I _wonder_ if you could plug in a FieldSelector that was aware of the 
date and then made the appropriate decision to return the correct 
price field.  (On a side note, I'd love to see Solr support generic 
FieldSelector plugin capability)



Alternatively, you could right a simple "post-processing" 
SearchComponent that loops over the return doc list (not the full doc 
set) and added a field to each document that contained the "official 
price".  Assuming you are only returning 10 or so results, I would 
think this would still perform pretty well.




-Grant

On May 6, 2009, at 4:32 AM, Andrew Ingram wrote:


Hi everyone,

I'm working on the search schema for ecommerce products and I'm having
an issue with the prices.

Basically, a product has two price values and a date, the product
effectively has one price before the date and the other one after.
This poses no problem for the site itself since I can use conditional
logic, but I have no idea how to approach this with regards to solr
queries.

The price of a product is used for both faceting and sorting and
should use whichever price is active at the time of the query. Is
there any way to do define a field whose value is a simple algorithm
operating on the value of other fields?

I'm quite happy to use a custom field type if necessary, though I'm
not sure if what I want is even possible and I don't really know where
to begin.

Any help would be appreciated

Regards,
Andrew Ingram


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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) 
using Solr/Lucene:

http://www.lucidimagination.com/search






Re: Solrconfig.xml

2009-05-06 Thread Grant Ingersoll

Is there an error in the logs?

On May 6, 2009, at 2:12 PM, Francis Yakin wrote:



I just upgraded from 1.2.0 to 1.3.0 of solr.
We have an existing data/index that I will be using from 1.2.0 to  
1.3.0 and I use the default solrconfig.xml that come from 1.3.0.


For some reason when I used solrconfig.xml from 1.2.0 it works and I  
can see the index and data, but I used solrconfig.xml from 1.3.0 I  
don't see the data and index.


What did I do wrong?

Thanks

Francis




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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Grant Ingersoll

WARNING: Low level Solr hacking and brainstorming:
I _wonder_ if you could plug in a FieldSelector that was aware of the  
date and then made the appropriate decision to return the correct  
price field.  (On a side note, I'd love to see Solr support generic  
FieldSelector plugin capability)



Alternatively, you could right a simple "post-processing"  
SearchComponent that loops over the return doc list (not the full doc  
set) and added a field to each document that contained the "official  
price".  Assuming you are only returning 10 or so results, I would  
think this would still perform pretty well.




-Grant

On May 6, 2009, at 4:32 AM, Andrew Ingram wrote:


Hi everyone,

I'm working on the search schema for ecommerce products and I'm having
an issue with the prices.

Basically, a product has two price values and a date, the product
effectively has one price before the date and the other one after.
This poses no problem for the site itself since I can use conditional
logic, but I have no idea how to approach this with regards to solr
queries.

The price of a product is used for both faceting and sorting and
should use whichever price is active at the time of the query. Is
there any way to do define a field whose value is a simple algorithm
operating on the value of other fields?

I'm quite happy to use a custom field type if necessary, though I'm
not sure if what I want is even possible and I don't really know where
to begin.

Any help would be appreciated

Regards,
Andrew Ingram


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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: Solr Plugins Simple Questions for the Simpleton

2009-05-06 Thread Grant Ingersoll


On May 6, 2009, at 3:25 PM, Jeff Newburn wrote:

We are trying to implement a SearchCompnent plugin.  I have been  
looking at
QueryElevateComponent trying to weed through what needs to be done.   
My

basic desire is to get the results back and manipulate them either by
altering the actual results or the facets.

Questions:
1. Do the components fire off in order or all individually? If so  
how does

one chain them together?


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




2. Where are the actual documents returned (ie what object gets the  
return

results)?


Look on the ResponseBuilder object.



3. Is there any specific place I should manipulate the result set?


I've done it in the past right on the response docset/doclist, but  
I've seen others discourage this kind of thing b/c you might not know  
the downstream effects




4. Can the individual documents be changed before returning to the  
client?


In what way?



--
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562



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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: Upgrading from 1.2.0 to 1.3.0

2009-05-06 Thread Grant Ingersoll
You need to upgrade the slaves first.  Make backups, etc. beforehand  
as well.


-Grant

On May 5, 2009, at 10:05 AM, Francis Yakin wrote:



What's the best way to upgrade solr from 1.2.0 to 1.3.0 ?

We have the current index that our users search running on 1.2.0  
Solr version.


We would like to upgrade it to 1.3.0?

We have Master/Slaves env.

What's the best way to upgrade it without affecting the search? Do  
we need to do it on master or slaves first?




Thanks

Francis




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

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Andrew Ingram
That is *very* clever and will almost certainly work. My only concern is 
that it doubles the overhead (and has a not insignificant effect on the 
complexity of my code) for what is essentially a minor feature. I'd like 
to keep this approach on the back-burner and see if a more conventional 
solution exists. Very nice idea though.


- Andy

Erick Erickson wrote:

Would it work to index the item N times, where N is the number
of discrete date ranges?

Say you had a hat that was $10 from 1/1/09 to 6/30/09 and $11 from
7/1/09 to 12/30/09. Just index it twice with the dates something like
valid_from, valid_to. Then form your queries so you were looking
in the proper date...

No idea if this *really* helps or not.

Best
Erick

On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram  wrote:

  

Hi everyone,

I'm working on the search schema for ecommerce products and I'm having
an issue with the prices.

Basically, a product has two price values and a date, the product
effectively has one price before the date and the other one after.
This poses no problem for the site itself since I can use conditional
logic, but I have no idea how to approach this with regards to solr
queries.

The price of a product is used for both faceting and sorting and
should use whichever price is active at the time of the query. Is
there any way to do define a field whose value is a simple algorithm
operating on the value of other fields?

I'm quite happy to use a custom field type if necessary, though I'm
not sure if what I want is even possible and I don't really know where
to begin.

Any help would be appreciated

Regards,
Andrew Ingram




  




Creating new QParserPlugin

2009-05-06 Thread KaktuChakarabati

Hello everyone,
I am trying to write a new QParserPlugin+QParser, one that will work similar
to how DisMax does, but will give me more control over the
FunctionQuery-related part of the query processing (e.g in regards to a
specified bf parameter).

In specific, I want to be able to affect the way the queryNorm (and possibly
other factors) interact with a 
pre-computed value I store in a static field (i.e I compute an index-time
score for a document that I wish to use in a bf as a ValueSource, without
being affected by queryNorm or other such extranous considerations.)

While trying this, I notice I run alot into cases where some parts I try to
override/inherit from are private to a java package namespace, and this
makes the whole thing very cumbersome.

Examples for this are the DismaxQParser class which is defined as a local
class inside the DisMaxQParserPlugin.java file (i think this is bad practice
- otherwise, FunctionQParserPlugin/FunctionQParser do have their own
seperate files, so i think this is a good convention to follow generally).
Another case is where i try to inherit from FunctionQParser and end up not
being able to replicate some of the parse() logic, because it uses the
QueryParsing.StrParser class which is a static inner class and so is only
accessible from the solr.search namespace.

In short, many such cases seem to arise and i think this poses a
considerable limitation on
the possibilities of extending solr.
If this resonates with more people here, I'd take this issue up with
solr-dev.

Otherwise, if some of you have some notions about going about what i'm
trying to do differently,
I would be happy to hear.

Thanks,
-Chak
-- 
View this message in context: 
http://www.nabble.com/Creating-new-QParserPlugin-tp23416974p23416974.html
Sent from the Solr - User mailing list archive at Nabble.com.



Solr Plugins Simple Questions for the Simpleton

2009-05-06 Thread Jeff Newburn
We are trying to implement a SearchCompnent plugin.  I have been looking at
QueryElevateComponent trying to weed through what needs to be done.  My
basic desire is to get the results back and manipulate them either by
altering the actual results or the facets.

Questions:
1. Do the components fire off in order or all individually? If so how does
one chain them together?
2. Where are the actual documents returned (ie what object gets the return
results)? 
3. Is there any specific place I should manipulate the result set?
4. Can the individual documents be changed before returning to the client?
-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562



Solrconfig.xml

2009-05-06 Thread Francis Yakin

I just upgraded from 1.2.0 to 1.3.0 of solr.
We have an existing data/index that I will be using from 1.2.0 to 1.3.0 and I 
use the default solrconfig.xml that come from 1.3.0.

For some reason when I used solrconfig.xml from 1.2.0 it works and I can see 
the index and data, but I used solrconfig.xml from 1.3.0 I don't see the data 
and index.

What did I do wrong?

Thanks

Francis




Re: solrcofig.xml - need some info

2009-05-06 Thread Raju444us

Hi Hoss,

If i extend SolrQueryParser and override method getFieldQuery for some
customization.Can I configure my new queryParser somthing like below

  

 
   explicit
   
 
  

Do I need to place my new Parser class in solr/home/lib folder?
Is this the right way to do this.

Thanks,
Raju




hossman wrote:
> 
> : I am pretty new to solr. I was wondering what is this "mm" attribute in
> : requestHandler in solrconfig.xml and how it works. Tried to search wiki
> : could not find it
> 
> Hmmm... yeah wiki search does mid-word matching doesn't it?
> 
> the key thng to realize is that the requestHandler you were looking at 
> when you saw that option was the DisMaxRequestHandler...
> 
>   http://wiki.apache.org/solr/DisMaxRequestHandler
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solrcofig.xml---need-some-info-tp15341858p23414447.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Delete complete core without stopping Solr

2009-05-06 Thread Otis Gospodnetic

How about:
delete by query *:* + optimize + unload

I believe unloading the code will update solr.xml if it has that persist 
setting in it (but haven't tried it).
This will leave all the other config and other files and dirs behind, though...

Oits
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
> From: vivek sar 
> To: solr-user@lucene.apache.org
> Sent: Wednesday, May 6, 2009 2:25:50 PM
> Subject: Delete complete core without stopping Solr
> 
> Hi,
> 
>   I'm using multi-core feature of Solr. Each Solr instance maintains
> multiple-core - each core of size 100G. I would like to delete older
> cores directory completely after 2 weeks (using file.delete).
> Currently, Solr loads all the cores that are listed in solr.xml. I was
> thinking of following,
> 
> 1) Call unload service to unload the core from Solr  - would this
> remove the entry from solr.xml as well?
> 2) Delete the core directory
> 
> Would this work? I'm hoping I don't have to restart or do any
> individual document deletes.
> 
> Thanks,
> -vivek



deltaImportQuery in child entity

2009-05-06 Thread Martin Davidsson
Hello, I have a data-config.xml that is structured in the following  
fashion:



   deltaImportQuery="deltaParentImportQuery" deltaQuery="deltaParentQuery">
  deltaImportQuery="deltaChildImportQuery" />

   


Is the deltaImportQuery attribute even allowed on the child entity?  
The behavior I'm seeing is that when I issue a delta-import command,  
Solr uses the deltaParentImportQuery and deltaParentQuery from the  
parent entity but the fullChildQuery from the child entity. I was  
hoping it would use the deltaChildImportQuery on the child entity to  
figure out what data to use in the case of a delta-import. Is the  
behavior I'm seeing expected? Is it possible to write data-config.xml  
in a way that I can use different queries to pull in the field data  
for a child entity depending on whether I'm doing a full- or delta- 
import? I'm using the nightly build from March 24, 2009. Thanks!


-- Martin Davidsson


Re: How to index the documents in Apache Solr

2009-05-06 Thread Eric Pugh
I would also recommend starting with the out of the box Jetty   
Otherwise you are both trying to learn the basics of Solr and how to  
stand it up in Tomcat.  It's not hard, but learn Solr basics first,  
then move to more advanced topics.


Eric

On May 6, 2009, at 9:57 AM, Erik Hatcher wrote:



On May 6, 2009, at 5:11 AM, uday kumar maddigatla wrote:



The link which shows the things in Jetty. But i'm using Tomcat.
hi,

If i run the command which is given in the link, it is tryinge to  
post the
indexes at port number 8983. But in my case my tomcat is running on  
8080.


Where to change the port.



~/dev/solr/example/exampledocs: java -jar post.jar -help
SimplePostTool: version 1.2
This is a simple command line tool for POSTing raw XML to a Solr
port.  XML data can be read from files specified as commandline
args; as raw commandline arg strings; or via STDIN.
Examples:
 java -Ddata=files -jar post.jar *.xml
 java -Ddata=args  -jar post.jar '42'
 java -Ddata=stdin -jar post.jar < hd.xml
Other options controlled by System Properties include the Solr
URL to POST to, and whether a commit should be executed.  These
are the defaults for all System Properties...
 -Ddata=files
 -Durl=http://localhost:8983/solr/update
 -Dcommit=yes


Erik



-
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com
Free/Busy: http://tinyurl.com/eric-cal






Delete complete core without stopping Solr

2009-05-06 Thread vivek sar
Hi,

  I'm using multi-core feature of Solr. Each Solr instance maintains
multiple-core - each core of size 100G. I would like to delete older
cores directory completely after 2 weeks (using file.delete).
Currently, Solr loads all the cores that are listed in solr.xml. I was
thinking of following,

1) Call unload service to unload the core from Solr  - would this
remove the entry from solr.xml as well?
2) Delete the core directory

Would this work? I'm hoping I don't have to restart or do any
individual document deletes.

Thanks,
-vivek


Re: Master Slave data distribution | rsync fail issue

2009-05-06 Thread Bill Au
Are the user/group/permissions on the snapshot files the same for both cases
(manual vs postCommit/postOptimize events)?

Bill

On Tue, May 5, 2009 at 12:54 PM, tushar kapoor <
tushar_kapoor...@rediffmail.com> wrote:

>
> Hi,
>
> I am facing an issue while performing snapshot pulling thru Snappuller
> script from slave server :
> We have the setup of multicores on Master Solr and Slave Solr servers.
> Scenario , 2 cores are set :
> i)  CORE_WWW.ABCD.COM
> ii) CORE_WWW.XYZ.COM
>
> rsync-enable and rsync-start script run from CORE_WWW.ABCD.COM on master
> server. Thus rsyncd.commf file got generated on CORE_WWW.ABCD.COM  only ,
> but not on CORE_WWW.XYZ.COM.
> Rsyncd.conf of CORE_WWW.ABCD.COM :
>  rsyncd.conf file 
> uid = webuser
> gid = webuser
> use chroot = no
> list = no
> pid file =
> /opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.ABCD.COM/logs/rsyncd.pid
> log file =
> /opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.ABCD.COM/logs/rsyncd.log
> [solr]
>path =
> /opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.ABCD.COM/data
>comment = Solr
>
> rsync error used to get generated while doing the  pulling of master server
> snapshot of a particular core "CORE_WWW.XYZ.COM" from slave end, for core
> "CORE_WWW.ABCD.COM" snappuller occured without any error.
>
> Also, this issue is coming only when snapshot are generated at master end
> thru the way given below:
> A)  Snapshot are generated automatically by
> editing  “${SOLR_HOME}/solr/conf/solrconfig.xml” to let either commit index
> or optimize index trigger the snapshooter (search “postCommit” and
> “postOptimize” to find the configuration section).
>
> Sample of solrconfig.xml entry on Master server End:
> I)
> 
>  
> name="exe">/opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.ABCD.COM/bin/snapshooter
>  
> name="dir">/opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.ABCD.COM/bin
>  true
>   arg1 arg2 
>   MYVAR=val1 
>
>
> same way done for core "CORE_WWW.XYZ.COM" solrConfig.xml.
> II) The   tag remains commented on both the cores .XML on master
> server.
>
> Log sample  for more clearity :
> rsyncd.log of the core "CORE_WWW.XYZ.COM":
> 2009/05/01 15:48:40 command: ./rsyncd-start
> 2009/05/01 15:48:40 [15064] rsyncd version 2.6.3 starting, listening on
> port
> 18983
> 2009/05/01 15:48:40 rsyncd started with
>
> data_dir=/opt/apache-tomcat-6.0.18/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.XYZ.COm/data
> and accepting requests
> 2009/05/01 15:50:36 [15195] rsync on solr/snapshot.20090501153311/ from
> deltrialmac.mac1.com (10.210.7.191)
> 2009/05/01 15:50:36 [15195] rsync: link_stat "snapshot.20090501153311/."
> (in
> solr) failed: No such file or directory (2)
> 2009/05/01 15:50:36 [15195] rsync error: some files could not be
> transferred
> (code 23) at main.c(442)
> 2009/05/01 15:52:23 [15301] rsync on solr/snapshot.20090501155030/ from
> delpearsondm.sapient.com (10.210.7.191)
> 2009/05/01 15:52:23 [15301] wrote 3438 bytes  read 290 bytes  total size
> 2779
> 2009/05/01 16:03:31 [15553] rsync on solr/snapshot.20090501160112/ from
> deltrialmac.mac1.com (10.210.7.191)
> 2009/05/01 16:03:31 [15553] rsync: link_stat "snapshot.20090501160112/."
> (in
> solr) failed: No such file or directory (2)
> 2009/05/01 16:03:31 [15553] rsync error: some files could not be
> transferred
> (code 23) at main.c(442)
> 2009/05/01 16:04:27 [15674] rsync on solr/snapshot.20090501160054/ from
> deltrialmac.mac1.com (10.210.7.191)
> 2009/05/01 16:04:27 [15674] wrote 4173214 bytes  read 290 bytes  total size
> 4174633
>
> I m unable to figure out that from where "/." gets appeneded at the end
> "snapshot.20090501153311/."
> "Snappuller.log"
> 2009/05/04 16:55:43 started by solrUser
> 2009/05/04 16:55:43 command:
> /opt/apache-solr-1.3.0/example/solr/multicore/
> CORE_WWW.PUFFINBOOKS.CA/bin/snappuller
> -u  webuser
> 2009/05/04 16:55:52 pulling snapshot snapshot.20090504164935
> 2009/05/04 16:56:09 rsync failed
> 2009/05/04 16:56:24 failed (elapsed time: 41 sec)
>
> Error shown on console :
> rsync: link_stat "snapshot.20090504164935/." (in solr) failed: No such file
> or directory (2)
> client: nothing to do: perhaps you need to specify some filenames or the
> --recursive option?
> rsync error: some files could not be transferred (code 23) at main.c(723)
>
> B) The same issue is not coming while manually running the Snapshot script
> after reguler interval of time at Master server and then running Snappuller
> script at slave end for multiple cores. The postCommit/postOptimize part of
> solrConfig.xml has been commented.
> Here also rsync script run thru the core "CORE_WWW.ABCD.COM". Snappuller
> and
> snapinstaller occurred successfully.
>
> Thanks in advance.
>
> --
> View this message in context:
> http://www.nabble.

Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Erick Erickson
Would it work to index the item N times, where N is the number
of discrete date ranges?

Say you had a hat that was $10 from 1/1/09 to 6/30/09 and $11 from
7/1/09 to 12/30/09. Just index it twice with the dates something like
valid_from, valid_to. Then form your queries so you were looking
in the proper date...

No idea if this *really* helps or not.

Best
Erick

On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram  wrote:

> Hi everyone,
>
> I'm working on the search schema for ecommerce products and I'm having
> an issue with the prices.
>
> Basically, a product has two price values and a date, the product
> effectively has one price before the date and the other one after.
> This poses no problem for the site itself since I can use conditional
> logic, but I have no idea how to approach this with regards to solr
> queries.
>
> The price of a product is used for both faceting and sorting and
> should use whichever price is active at the time of the query. Is
> there any way to do define a field whose value is a simple algorithm
> operating on the value of other fields?
>
> I'm quite happy to use a custom field type if necessary, though I'm
> not sure if what I want is even possible and I don't really know where
> to begin.
>
> Any help would be appreciated
>
> Regards,
> Andrew Ingram
>


Re: Filter Query with multiple values

2009-05-06 Thread Stephane Bailliez
Sweet, thanks Erik !


On Wed, May 6, 2009 at 6:01 PM, Erik Hatcher wrote:

>
> On May 6, 2009, at 11:38 AM, Stephane Bailliez wrote:
>
>  Hello,
>>
>> I cannot seem to find a way with the syntax to express multiple values for
>> a
>> filter query.
>>
>> I have documents with field 'type'  : a, b, c, d and I'd like to only
>> search
>> within documents a and b.
>>
>> One way to do it would be to work on exclusion fq like:
>> fq=-type:c&fq=-type:d but then all hell break lose if I introduce a
>> document
>> of type 'e'.
>>
>> Is there something extremely obvious that I'm missing ?
>>
>
> fq=type:(a OR b)
>
>:)
>
>Erik
>
>
>


Re: Filter Query with multiple values

2009-05-06 Thread Erik Hatcher


On May 6, 2009, at 11:38 AM, Stephane Bailliez wrote:


Hello,

I cannot seem to find a way with the syntax to express multiple  
values for a

filter query.

I have documents with field 'type'  : a, b, c, d and I'd like to  
only search

within documents a and b.

One way to do it would be to work on exclusion fq like:
fq=-type:c&fq=-type:d but then all hell break lose if I introduce a  
document

of type 'e'.

Is there something extremely obvious that I'm missing ?


fq=type:(a OR b)

:)

Erik




When should I

2009-05-06 Thread Eric Sabourin
Is the optimize xml command something which is only required when I delete
all the docs?
Or should I also send the optimize command following other operations? or
daily?

Thanks...
Eric


Filter Query with multiple values

2009-05-06 Thread Stephane Bailliez
Hello,

I cannot seem to find a way with the syntax to express multiple values for a
filter query.

I have documents with field 'type'  : a, b, c, d and I'd like to only search
within documents a and b.

One way to do it would be to work on exclusion fq like:
fq=-type:c&fq=-type:d but then all hell break lose if I introduce a document
of type 'e'.

Is there something extremely obvious that I'm missing ?

Cheers,

-- stephane


Re: Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Matt Weber
I do not think this is possible.  You will probably want to handle  
this logic on your side during indexing.  Index the document with the  
fist price, then as that price expires, update the document with the  
new price.


Thanks,

Matt Weber
eSr Technologies
http://www.esr-technologies.com




On May 6, 2009, at 4:32 AM, Andrew Ingram wrote:


Hi everyone,

I'm working on the search schema for ecommerce products and I'm having
an issue with the prices.

Basically, a product has two price values and a date, the product
effectively has one price before the date and the other one after.
This poses no problem for the site itself since I can use conditional
logic, but I have no idea how to approach this with regards to solr
queries.

The price of a product is used for both faceting and sorting and
should use whichever price is active at the time of the query. Is
there any way to do define a field whose value is a simple algorithm
operating on the value of other fields?

I'm quite happy to use a custom field type if necessary, though I'm
not sure if what I want is even possible and I don't really know where
to begin.

Any help would be appreciated

Regards,
Andrew Ingram




Re: How to index the documents in Apache Solr

2009-05-06 Thread Erik Hatcher


On May 6, 2009, at 5:11 AM, uday kumar maddigatla wrote:



The link which shows the things in Jetty. But i'm using Tomcat.
hi,

If i run the command which is given in the link, it is tryinge to  
post the
indexes at port number 8983. But in my case my tomcat is running on  
8080.


Where to change the port.



~/dev/solr/example/exampledocs: java -jar post.jar -help
SimplePostTool: version 1.2
This is a simple command line tool for POSTing raw XML to a Solr
port.  XML data can be read from files specified as commandline
args; as raw commandline arg strings; or via STDIN.
Examples:
  java -Ddata=files -jar post.jar *.xml
  java -Ddata=args  -jar post.jar '42'
  java -Ddata=stdin -jar post.jar < hd.xml
Other options controlled by System Properties include the Solr
URL to POST to, and whether a commit should be executed.  These
are the defaults for all System Properties...
  -Ddata=files
  -Durl=http://localhost:8983/solr/update
  -Dcommit=yes


Erik



Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Nicolas Pastorino


On May 6, 2009, at 15:17 , Noble Paul നോബിള്‍  
नोब्ळ् wrote:



Why would you want to write it to the data dir? why can't it be in the
same place (conf) ?
Well, fact is that the QueryElevationComponent loads the  
configuration file ( elevate.xml ) either from the data dir, either  
from the conf dir.
Which means that existing setups using this component maybe using  
either location.
That is the only reason why i judged necessary to keep supporting  
this "flexibility".


But this could be simplified, forcing the elevate.xml file to be in  
the conf dir, and having a system ( the one you proposed, or the  
request handler attached to the issue ) to reload the configuration  
from the conf dir ( which is currently not possible. While when  
elevate.xml is stored in the dataDir, triggering a commit would  
reload it ).
I was just unsure about all ins and outs of the Elevation system, and  
then did not remove this flexibility.


Thanks for your expert eye on this !



On Wed, May 6, 2009 at 6:43 PM, Nicolas Pastorino  wrote:

Hello,

On May 6, 2009, at 15:02 , Noble Paul നോബിള്‍  
नोब्ळ् wrote:


The elevate.xml is loaded from conf dir when the core is  
reloaded . if

you post the new xml you will have to reload the core.

A simple solution would be to write a RequestHandler which extends
QueryElevationComponent which can be a listener for commit and  
call an

super.inform() on that event


You may want to have a look at this issue :
https://issues.apache.org/jira/browse/SOLR-1147
The proposed solution ( new request handler, attached to the  
ticket ),

solves the issue in both cases :
* when elevate.xml is in the DataDir.
* when elevate.xml is in the conf dir.

Basically this new request handler receives, as XML, the new  
configuration,

writes it to the right place ( some logic was copied from the
QueryElevationComponent.inform() code ), and then calls the inform 
() method
on the QueryElevationComponent for the current core, as you  
suggested above,

to reload the Elevate configuration.
--
Nicolas


On Fri, Apr 10, 2009 at 5:18 PM, Nicolas Pastorino   
wrote:


Hello !


Browsing the mailing-list's archives did not help me find the  
answer,

hence
the question asked directly here.

Some context first :
Integrating Solr with a CMS ( eZ Publish ), we chose to support
Elevation.
The idea is to be able to 'elevate' any object from the CMS.  
This can be

achieved through eZ Publish's back office, with a dedicated Elevate
administration GUI, the configuration is stored in the CMS  
temporarily,

and
then synchronized frequently and/or on demand onto Solr. This
synchronisation is currently done as follows :
1. Generate the elevate.xml based on the stored configuration
2. Replace elevate.xml in Solr's dataDir
3. Commit. It appears that when having elevate.xml in Solr's  
dataDir, and
solely in this case, commiting triggers a reload of elevate.xml.  
This

does
not happen when elevate.xml is stored in Solr's conf dir.


This method has one main issue though : eZ Publish needs to have  
access

to
the same filesystem as the one on which Solr's dataDir is  
stored. This is

not always the case when the CMS is clustered for instance --> show
stopper
:(

Hence the following idea / RFC :
How about extending the Query Elevation system with the  
possibility to

push
an updated elevate.xml file/XML through HTTP ?
This would update the file where it is actually located, and  
trigger a

reload of the configuration.
Not being very knowledgeable about Solr's API ( yet ! ), i  
cannot figure

out
whether this would be possible, how this would be achievable  
( which type

of
plugin for instance ) or even be valid ?

Thanks a lot in advance for your thoughts,
--
Nicolas








--
-
Noble Paul | Principal Engineer| AOL | http://aol.com


--
Nicolas Pastorino
Consultant - Trainer - System Developer
Phone :  +33 (0)4.78.37.01.34
eZ Systems ( Western Europe )  |  http://ez.no









--
-
Noble Paul | Principal Engineer| AOL | http://aol.com


--
Nicolas Pastorino
Consultant - Trainer - System Developer
Phone :  +33 (0)4.78.37.01.34
eZ Systems ( Western Europe )  |  http://ez.no






Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
Why would you want to write it to the data dir? why can't it be in the
same place (conf) ?

On Wed, May 6, 2009 at 6:43 PM, Nicolas Pastorino  wrote:
> Hello,
>
> On May 6, 2009, at 15:02 , Noble Paul നോബിള്‍ नोब्ळ् wrote:
>
>> The elevate.xml is loaded from conf dir when the core is reloaded . if
>> you post the new xml you will have to reload the core.
>>
>> A simple solution would be to write a RequestHandler which extends
>> QueryElevationComponent which can be a listener for commit and call an
>> super.inform() on that event
>
> You may want to have a look at this issue :
> https://issues.apache.org/jira/browse/SOLR-1147
> The proposed solution ( new request handler, attached to the ticket ),
> solves the issue in both cases :
> * when elevate.xml is in the DataDir.
> * when elevate.xml is in the conf dir.
>
> Basically this new request handler receives, as XML, the new configuration,
> writes it to the right place ( some logic was copied from the
> QueryElevationComponent.inform() code ), and then calls the inform() method
> on the QueryElevationComponent for the current core, as you suggested above,
> to reload the Elevate configuration.
> --
> Nicolas
>
>
>> On Fri, Apr 10, 2009 at 5:18 PM, Nicolas Pastorino  wrote:
>>>
>>> Hello !
>>>
>>>
>>> Browsing the mailing-list's archives did not help me find the answer,
>>> hence
>>> the question asked directly here.
>>>
>>> Some context first :
>>> Integrating Solr with a CMS ( eZ Publish ), we chose to support
>>> Elevation.
>>> The idea is to be able to 'elevate' any object from the CMS. This can be
>>> achieved through eZ Publish's back office, with a dedicated Elevate
>>> administration GUI, the configuration is stored in the CMS temporarily,
>>> and
>>> then synchronized frequently and/or on demand onto Solr. This
>>> synchronisation is currently done as follows :
>>> 1. Generate the elevate.xml based on the stored configuration
>>> 2. Replace elevate.xml in Solr's dataDir
>>> 3. Commit. It appears that when having elevate.xml in Solr's dataDir, and
>>> solely in this case, commiting triggers a reload of elevate.xml. This
>>> does
>>> not happen when elevate.xml is stored in Solr's conf dir.
>>>
>>>
>>> This method has one main issue though : eZ Publish needs to have access
>>> to
>>> the same filesystem as the one on which Solr's dataDir is stored. This is
>>> not always the case when the CMS is clustered for instance --> show
>>> stopper
>>> :(
>>>
>>> Hence the following idea / RFC :
>>> How about extending the Query Elevation system with the possibility to
>>> push
>>> an updated elevate.xml file/XML through HTTP ?
>>> This would update the file where it is actually located, and trigger a
>>> reload of the configuration.
>>> Not being very knowledgeable about Solr's API ( yet ! ), i cannot figure
>>> out
>>> whether this would be possible, how this would be achievable ( which type
>>> of
>>> plugin for instance ) or even be valid ?
>>>
>>> Thanks a lot in advance for your thoughts,
>>> --
>>> Nicolas
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> -
>> Noble Paul | Principal Engineer| AOL | http://aol.com
>
> --
> Nicolas Pastorino
> Consultant - Trainer - System Developer
> Phone :  +33 (0)4.78.37.01.34
> eZ Systems ( Western Europe )  |  http://ez.no
>
>
>
>
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Nicolas Pastorino

Hello,

On May 6, 2009, at 15:02 , Noble Paul നോബിള്‍  
नोब्ळ् wrote:



The elevate.xml is loaded from conf dir when the core is reloaded . if
you post the new xml you will have to reload the core.

A simple solution would be to write a RequestHandler which extends
QueryElevationComponent which can be a listener for commit and call an
super.inform() on that event
You may want to have a look at this issue : https://issues.apache.org/ 
jira/browse/SOLR-1147
The proposed solution ( new request handler, attached to the  
ticket ), solves the issue in both cases :

* when elevate.xml is in the DataDir.
* when elevate.xml is in the conf dir.

Basically this new request handler receives, as XML, the new  
configuration, writes it to the right place ( some logic was copied  
from the QueryElevationComponent.inform() code ), and then calls the  
inform() method on the QueryElevationComponent for the current core,  
as you suggested above, to reload the Elevate configuration.

--
Nicolas



On Fri, Apr 10, 2009 at 5:18 PM, Nicolas Pastorino  wrote:

Hello !


Browsing the mailing-list's archives did not help me find the  
answer, hence

the question asked directly here.

Some context first :
Integrating Solr with a CMS ( eZ Publish ), we chose to support  
Elevation.
The idea is to be able to 'elevate' any object from the CMS. This  
can be

achieved through eZ Publish's back office, with a dedicated Elevate
administration GUI, the configuration is stored in the CMS  
temporarily, and

then synchronized frequently and/or on demand onto Solr. This
synchronisation is currently done as follows :
1. Generate the elevate.xml based on the stored configuration
2. Replace elevate.xml in Solr's dataDir
3. Commit. It appears that when having elevate.xml in Solr's  
dataDir, and
solely in this case, commiting triggers a reload of elevate.xml.  
This does

not happen when elevate.xml is stored in Solr's conf dir.


This method has one main issue though : eZ Publish needs to have  
access to
the same filesystem as the one on which Solr's dataDir is stored.  
This is
not always the case when the CMS is clustered for instance -->  
show stopper

:(

Hence the following idea / RFC :
How about extending the Query Elevation system with the  
possibility to push

an updated elevate.xml file/XML through HTTP ?
This would update the file where it is actually located, and  
trigger a

reload of the configuration.
Not being very knowledgeable about Solr's API ( yet ! ), i cannot  
figure out
whether this would be possible, how this would be achievable  
( which type of

plugin for instance ) or even be valid ?

Thanks a lot in advance for your thoughts,
--
Nicolas








--
-
Noble Paul | Principal Engineer| AOL | http://aol.com


--
Nicolas Pastorino
Consultant - Trainer - System Developer
Phone :  +33 (0)4.78.37.01.34
eZ Systems ( Western Europe )  |  http://ez.no






Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
The elevate.xml is loaded from conf dir when the core is reloaded . if
you post the new xml you will have to reload the core.

A simple solution would be to write a RequestHandler which extends
QueryElevationComponent which can be a listener for commit and call an
super.inform() on that event

On Fri, Apr 10, 2009 at 5:18 PM, Nicolas Pastorino  wrote:
> Hello !
>
>
> Browsing the mailing-list's archives did not help me find the answer, hence
> the question asked directly here.
>
> Some context first :
> Integrating Solr with a CMS ( eZ Publish ), we chose to support Elevation.
> The idea is to be able to 'elevate' any object from the CMS. This can be
> achieved through eZ Publish's back office, with a dedicated Elevate
> administration GUI, the configuration is stored in the CMS temporarily, and
> then synchronized frequently and/or on demand onto Solr. This
> synchronisation is currently done as follows :
> 1. Generate the elevate.xml based on the stored configuration
> 2. Replace elevate.xml in Solr's dataDir
> 3. Commit. It appears that when having elevate.xml in Solr's dataDir, and
> solely in this case, commiting triggers a reload of elevate.xml. This does
> not happen when elevate.xml is stored in Solr's conf dir.
>
>
> This method has one main issue though : eZ Publish needs to have access to
> the same filesystem as the one on which Solr's dataDir is stored. This is
> not always the case when the CMS is clustered for instance --> show stopper
> :(
>
> Hence the following idea / RFC :
> How about extending the Query Elevation system with the possibility to push
> an updated elevate.xml file/XML through HTTP ?
> This would update the file where it is actually located, and trigger a
> reload of the configuration.
> Not being very knowledgeable about Solr's API ( yet ! ), i cannot figure out
> whether this would be possible, how this would be achievable ( which type of
> plugin for instance ) or even be valid ?
>
> Thanks a lot in advance for your thoughts,
> --
> Nicolas
>
>
>
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: QueryElevationComponent : hot update of elevate.xml

2009-05-06 Thread Nicolas Pastorino

Hi,

On Apr 10, 2009, at 16:51 , Ryan McKinley wrote:



On Apr 10, 2009, at 7:48 AM, Nicolas Pastorino wrote:


Hello !


Browsing the mailing-list's archives did not help me find the  
answer, hence the question asked directly here.


Some context first :
Integrating Solr with a CMS ( eZ Publish ), we chose to support  
Elevation. The idea is to be able to 'elevate' any object from the  
CMS. This can be achieved through eZ Publish's back office, with a  
dedicated Elevate administration GUI, the configuration is stored  
in the CMS temporarily, and then synchronized frequently and/or on  
demand onto Solr. This synchronisation is currently done as follows :

1. Generate the elevate.xml based on the stored configuration
2. Replace elevate.xml in Solr's dataDir
3. Commit. It appears that when having elevate.xml in Solr's  
dataDir, and solely in this case, commiting triggers a reload of  
elevate.xml. This does not happen when elevate.xml is stored in  
Solr's conf dir.



This method has one main issue though : eZ Publish needs to have  
access to the same filesystem as the one on which Solr's dataDir  
is stored. This is not always the case when the CMS is clustered  
for instance --> show stopper :(


Hence the following idea / RFC :
How about extending the Query Elevation system with the  
possibility to push an updated elevate.xml file/XML through HTTP ?
This would update the file where it is actually located, and  
trigger a reload of the configuration.
Not being very knowledgeable about Solr's API ( yet ! ), i cannot  
figure out whether this would be possible, how this would be  
achievable ( which type of plugin for instance ) or even be valid ?



Perhaps look at implementing custom RequestHandler:
http://wiki.apache.org/solr/SolrRequestHandler

maybe it could POST the new elevate.xm and then save it to the  
right place and call commit...

Thanks Ryan for your answer.

Here is the related issue in JIRA : https://issues.apache.org/jira/ 
browse/SOLR-1147
It includes a Request Handler, as you advised, which takes care of  
all this. I guess we can follow up on this on JIRA from now on.

--
Nicolas
eZ Systems


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

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

  _  

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


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

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

Cheers
Avlesh


On Wed, May 6, 2009 at 4:43 PM, Radha C.  wrote:


Hi,

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

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

Thanks in advance.





Conditional/Calculated Fields (is it possible?)

2009-05-06 Thread Andrew Ingram
Hi everyone,

I'm working on the search schema for ecommerce products and I'm having
an issue with the prices.

Basically, a product has two price values and a date, the product
effectively has one price before the date and the other one after.
This poses no problem for the site itself since I can use conditional
logic, but I have no idea how to approach this with regards to solr
queries.

The price of a product is used for both faceting and sorting and
should use whichever price is active at the time of the query. Is
there any way to do define a field whose value is a simple algorithm
operating on the value of other fields?

I'm quite happy to use a custom field type if necessary, though I'm
not sure if what I want is even possible and I don't really know where
to begin.

Any help would be appreciated

Regards,
Andrew Ingram


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

2009-05-06 Thread Avlesh Singh
Query for "text" to be present in all the fields:
q=(+A:text +B:text +C:text)

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

Cheers
Avlesh

On Wed, May 6, 2009 at 4:43 PM, Radha C.  wrote:

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


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

2009-05-06 Thread Venkatesan A.
Excellent Radha

-Original Message-
From: Radha C. [mailto:cra...@ceiindia.com] 
Sent: Wednesday, May 06, 2009 4:43 PM
To: solr-user@lucene.apache.org
Subject: what is the query syntax to search a value in more than one field.

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



Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread Sami Siren

post.jar also supports specifying alternative url, see output from

java -jar post.jar -help

for more info.

--
 Sami Siren


uday kumar maddigatla wrote:

hi

you mis understood my question.

When i try to use the command java -post.jar *.*. It is trying to Post files
in Solr which is there in 8983 port. If we use Jety then the default port
number is 8983. But what about the thing that if we use tomcat which uses
8080 as port.

If we use Jetty we can access Solr with this address
http://localhost:8983/solr.

If we use Tomcat we can access Solr with this address 
http://localhost:8080/solr.


So if we use above command(java -post.jar) it clearly shows this kind of
message in command promt

C:\TestDocumets>java -jar post.jar *.*
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
other encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file OIO_INV_579814008_14118.xml
SimplePostTool: FATAL: Connection error (is Solr running at
http://localhost:8983/solr/update ?): java.net.ConnectException: Connection
refused: connect

Means it is trying to post the files in Solr running at
http://localhost:8983/solr/update . But in my case Solr is running in 8080
port. Only b'use of Solr i can't change my tomcat port number.

Is there any other possibility in Solr to index the documents rather than
command utility.


Michael Ludwig-4 wrote:

uday kumar maddigatla schrieb:


My intention is to use 8080 as port.

Is there any other way taht Solr will post the files in 8080 port

Solr doesn't post, it listens.

Use the curl utility as indicated in the documentation.

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

Michael Ludwig








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

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


Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread Michael Ludwig

uday kumar maddigatla schrieb:


When i try to use the command java -post.jar *.*. It is trying to Post
files in Solr which is there in 8983 port.


The post.jar seems to be hardcoded to port 8983, that's why I pointed
you to the curl utilty, which lets you specify any port and address you
can dream up.

Seriously, read the docs, it'll help you :-)

Michael Ludwig


Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread uday kumar maddigatla

hi

you mis understood my question.

When i try to use the command java -post.jar *.*. It is trying to Post files
in Solr which is there in 8983 port. If we use Jety then the default port
number is 8983. But what about the thing that if we use tomcat which uses
8080 as port.

If we use Jetty we can access Solr with this address
http://localhost:8983/solr.

If we use Tomcat we can access Solr with this address 
http://localhost:8080/solr.

So if we use above command(java -post.jar) it clearly shows this kind of
message in command promt

C:\TestDocumets>java -jar post.jar *.*
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
other encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file OIO_INV_579814008_14118.xml
SimplePostTool: FATAL: Connection error (is Solr running at
http://localhost:8983/solr/update ?): java.net.ConnectException: Connection
refused: connect

Means it is trying to post the files in Solr running at
http://localhost:8983/solr/update . But in my case Solr is running in 8080
port. Only b'use of Solr i can't change my tomcat port number.

Is there any other possibility in Solr to index the documents rather than
command utility.


Michael Ludwig-4 wrote:
> 
> uday kumar maddigatla schrieb:
> 
>> My intention is to use 8080 as port.
>>
>> Is there any other way taht Solr will post the files in 8080 port
> 
> Solr doesn't post, it listens.
> 
> Use the curl utility as indicated in the documentation.
> 
> http://wiki.apache.org/solr/UpdateXmlMessages
> 
> Michael Ludwig
> 
> 

-- 
View this message in context: 
http://www.nabble.com/unable-to-run-the-solr-in-tomcat-5.0-tp23400759p23403766.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread Michael Ludwig

uday kumar maddigatla schrieb:


My intention is to use 8080 as port.

Is there any other way taht Solr will post the files in 8080 port


Solr doesn't post, it listens.

Use the curl utility as indicated in the documentation.

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

Michael Ludwig


Re: Using Solr to index a database

2009-05-06 Thread uday kumar maddigatla

Hi

I too having the same doubt. I would like to check How Solr is index and
search the data which is there in database.

 For example, lets say we have a table called PRODUCTS, and within that
table, we have the following columns: 
NUMBER (product number) 
NAME (product name) 
PRICE 

How would weindex all this information? Here is an example (from the links
you provided) of xml (data-config.xml)
deltaQuery="select id from item where last_modified >
'${dataimporter.last_index_time}'"> 
 
 
 

Need Help in this.




Noble Paul നോബിള്‍  नोब्ळ् wrote:
> 
> delta query is for incremental imports
> 
> us ethe  'query' attribute to import data
> 
> 
> On Tue, Apr 21, 2009 at 7:35 PM, ahammad  wrote:
>>
>> Thanks for the link...
>>
>> I'm still a bit unclear as to how it goes. For example, lets say i have a
>> table called PRODUCTS, and within that table, I have the following
>> columns:
>> NUMBER (product number)
>> NAME (product name)
>> PRICE
>>
>> How would I index all this information? Here is an example (from the
>> links
>> you provided) of xml that confuses me:
>>
>>            >    --->    deltaQuery="select id from item where last_modified >
>> '${dataimporter.last_index_time}'">
>>            
>>            
>>            
>>
>> What is that deltaQuery (or even if it was a regular "query" expression)
>> line for? It seems to me like a sort of filter. What if I don't want to
>> filter anything and just want to index all the rows?
>>
>> Cheers
>>
>>
>>
>>
>> Noble Paul നോബിള്‍  नोब्ळ् wrote:
>>>
>>> On Mon, Apr 20, 2009 at 7:15 PM, ahammad  wrote:

 Hello,

 I've never used Solr before, but I believe that it will suit my current
 needs with indexing information from a database.

 I downloaded and extracted Solr 1.3 to play around with it. I've been
 looking at the following tutorials:
 http://www.ibm.com/developerworks/java/library/j-solr-update/index.html
 http://www.ibm.com/developerworks/java/library/j-solr-update/index.html
 http://wiki.apache.org/solr/DataImportHandler
 http://wiki.apache.org/solr/DataImportHandler

 There are a few things I don't understand. For example, the IBM article
 sometimes refers to directories that aren't there, or a little
 different
 from what I have in my extracted copy of Solr (ie
 solr-dw/rss/conf/solrconfig.xml). I tried to follow the steps as best I
 can,
 but as soon as I put the following in solrconfig.xml, the whole thing
 breaks:

 >>>  class="org.apache.solr.handler.dataimport.DataImportHandler">
 
  rss-data-config.xml
 
 

 Obviously I replace with my own info...One thing I don't quite get is
 the
 data-config.xml file. What exactly is it? I've seen examples of what it
 contains but since I don't know enough, I couldn't really adjust it. In
 any
 case, this is the error I get, which may be because of a misconfigured
 data-config.xml...
>>> the data-config.xml describes how to fetch data from various data
>>> sources and index them into Solr.
>>>
>>> The stacktrace says that your xml is invalid.
>>>
>>> The best bet is to take one of the sample dataconfig xml files and make
>>> changes.
>>>
>>> http://svn.apache.org/viewvc/lucene/solr/trunk/example/example-DIH/solr/db/conf/db-data-config.xml?revision=691151&view=markup
>>>
>>> http://svn.apache.org/viewvc/lucene/solr/trunk/example/example-DIH/solr/rss/conf/rss-data-config.xml?revision=691151&view=markup
>>>
>>>

 org.apache.solr.handler.dataimport.DataImportHandlerException:
 Exception
 occurred while initializing context at
 org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:165)
 at
 org.apache.solr.handler.dataimport.DataImporter.(DataImporter.java:99)
 at
 org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:96)
 at
 org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
 at org.apache.solr.core.SolrCore.(SolrCore.java:571) at
 org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:122)
 at
 org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
 at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
 at
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at
 org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78)
 at
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at
 org.apache.catali

Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread uday kumar maddigatla

hi

i know we can change the tomcat port number.

But i don't want that. My intention is to use 8080 as port. 

Is there any other way taht Solr will post the files in 8080 port


Michael Ludwig-4 wrote:
> 
> uday kumar maddigatla schrieb:
> 
>> The link which shows the things in Jetty. But i'm using Tomcat.
>>
>> If i run the command which is given in the link, it is tryinge to post
>> the indexes at port number 8983. But in my case my tomcat is running
>> on 8080.
>>
>> Where to change the port.
> 
> That's a basic Tomcat question. The answer is: In your Tomcat's
> server.xml configuration file. Look here:
> 
> http://tomcat.apache.org/tomcat-6.0-doc/config/
> 
> Then, look for the "port" parameter here:
> 
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> 
> You could also change the port in the address bar of your browser.
> Or even do a string replacement s/8983/8080/g on the Solr doc you're
> viewing.
> 
> Michael Ludwig
> 
> 

-- 
View this message in context: 
http://www.nabble.com/unable-to-run-the-solr-in-tomcat-5.0-tp23400759p23403049.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread Michael Ludwig

uday kumar maddigatla schrieb:


The link which shows the things in Jetty. But i'm using Tomcat.

If i run the command which is given in the link, it is tryinge to post
the indexes at port number 8983. But in my case my tomcat is running
on 8080.

Where to change the port.


That's a basic Tomcat question. The answer is: In your Tomcat's
server.xml configuration file. Look here:

http://tomcat.apache.org/tomcat-6.0-doc/config/

Then, look for the "port" parameter here:

http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

You could also change the port in the address bar of your browser.
Or even do a string replacement s/8983/8080/g on the Solr doc you're
viewing.

Michael Ludwig


Re: How to index the documents in Apache Solr

2009-05-06 Thread uday kumar maddigatla

The link which shows the things in Jetty. But i'm using Tomcat. 
hi,

If i run the command which is given in the link, it is tryinge to post the
indexes at port number 8983. But in my case my tomcat is running on 8080. 

Where to change the port. 

here is the error 
SimplePostTool: FATAL: Connection error (is Solr running at
http://localhost:8983/solr/update ?): java.net.ConnectException: Connection
refused: connect

please help me inthis. 


Michael Ludwig-4 wrote:
> 
> uday kumar maddigatla schrieb:
>> hi
>>
>> i installed the Apache Solr in tomcat 5.0. I'm able to see the admin
>> page as well as welcome page
>>
>> Now i would like to index the documents. How?
> 
> Did you have a look at the tutorial? It contains introductory
> documentation pertaining to what you want to achieve. I think
> you should start there.
> 
> http://lucene.apache.org/solr/tutorial.html#Indexing+Data
> 
> Michael Ludwig
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-index-the-documents-in-Apache-Solr-tp23402657p23402845.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to index the documents in Apache Solr

2009-05-06 Thread Michael Ludwig

uday kumar maddigatla schrieb:

hi

i installed the Apache Solr in tomcat 5.0. I'm able to see the admin
page as well as welcome page

Now i would like to index the documents. How?


Did you have a look at the tutorial? It contains introductory
documentation pertaining to what you want to achieve. I think
you should start there.

http://lucene.apache.org/solr/tutorial.html#Indexing+Data

Michael Ludwig


Re: How to index the documents in Apache Solr

2009-05-06 Thread Avlesh Singh
http://wiki.apache.org/solr/DataImportHandler

Cheers
Avlesh

On Wed, May 6, 2009 at 2:28 PM, uday kumar maddigatla  wrote:

>
> hi
>
> i installed the Apache Solr in tomcat 5.0. I'm able to see the admin page
> as
> well as welcome page
>
> Now i would like to index the documents. How?
>
> Help me in this.
>
> --
> View this message in context:
> http://www.nabble.com/How-to-index-the-documents-in-Apache-Solr-tp23402657p23402657.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread uday kumar maddigatla

hi
thanks for your help. i got the solution.

we need to place the examples/solr folder in bin folder of tomcat in order
to run

Now i'm able to run this.

But how to index the files.

The link which shows the things in Jetty. But i'm using Tomcat.

If i run the command which is given in the link, it is tryinge to post the
indexes at port number 8983. But in my case my tomcat is running on 8080.

Where to change the port.

here is the error
SimplePostTool: FATAL: Connection error (is Solr running at
http://localhost:8983/solr/update ?): java.net.ConnectException: Connection
refused: connect

please help me inthis.



uday kumar maddigatla wrote:
> 
> Hi,
> 
> I'm new to this Solr. I got distribution of Solr. i placed the war file in
> tomcat/webapps. 
> 
> After that i don't know what to do. I got confused while reading The
> instalation notes which is given in wiki .
> 
> What is the next step to run the Solr.
> 
> I really got confused with the lines in wiki.
> 
> Please help me with instalation instructions.
> 

-- 
View this message in context: 
http://www.nabble.com/unable-to-run-the-solr-in-tomcat-5.0-tp23400759p23402729.html
Sent from the Solr - User mailing list archive at Nabble.com.



How to index the documents in Apache Solr

2009-05-06 Thread uday kumar maddigatla

hi 

i installed the Apache Solr in tomcat 5.0. I'm able to see the admin page as
well as welcome page

Now i would like to index the documents. How?

Help me in this.

-- 
View this message in context: 
http://www.nabble.com/How-to-index-the-documents-in-Apache-Solr-tp23402657p23402657.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Encoding issue with solr querying

2009-05-06 Thread KK
Can someone tell me how to query for some raw unicode text[the one mentioned
in my last mail] through SolrJ?

Thanks,
KK.

On Tue, May 5, 2009 at 6:40 PM, KK  wrote:

> I have indexed some non-english pages in solr index. From the solr admin
> interface I can query using the raw unicodes like this,
>
> \u062d\u06c2 \u0627\u0648\u0644\u202c
>
> and this gives the resulting page correctly. Now I'm trying to do that
> through java script in a web page via SolrJ for english queries it is
> working fine but not for non-english content.
> If I've to use the above unicoded query then how shall I proceed. I've a
> method to which I pass the query which returns back the result after quering
> solr. I even tried encoding the query in UTF-8 but of no use. The web page
> is like this
>
> *
> 
>  onClick="document.solrJava.setQuery(getQuery());">
> 
>  MAYSCRIPT id="talk">
> 
> 
> 
> *
>  setQuery() is part of solrJave class that just sets the query string and
> getQuery() function is emebeded inside the javascript like this,
>
>  *
> function getQuery() {
> return (encodeUTF8("non-english-query"));   //my query, how to
> put the unicoded query here? for any english queries its working fine.
> }
>  *
>
> I tried using some encode/decode for utf-8, the functions are given below,
>
>  *
> function encodeUTF8( s ){
>   return unescape( encodeURIComponent( s ) );
> }
> function decodeUTF8( s ){
>   return decodeURIComponent( escape( s ) );
> }
>  *
>
>
>  Any advice will be highly appreciated.
>
> KK
>


Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread Michael Ludwig

uday kumar maddigatla schrieb:

Hi,

I'm new to this Solr. I got distribution of Solr. i placed the war
file in tomcat/webapps.

After that i don't know what to do. I got confused while reading The
instalation notes which is given in wiki .


It might be easier for you to follow the instructions in the tutorial
and run Solr in Jetty as per the distribution, which works out of the
box:

http://lucene.apache.org/solr/tutorial.html

Michael Ludwig


Re: schema.xml: default values for @indexed and @stored

2009-05-06 Thread Michael Ludwig

Otis Gospodnetic schrieb:

Attribute values for fields should be inherited from attribute values
of their field types.


Thanks, that answers my question pertaining to @indexed and @stored in
the "fieldtype" and "field" elements in "schema.xml".

Michael Ludwig


Re: Multi-index Design

2009-05-06 Thread Michael Ludwig

Matt Weber schrieb:


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


Thanks, Mark. Your explanation and the pointer to the Wiki have
clarified things for me.

Michael Ludwig


Re: unable to run the solr in tomcat 5.0

2009-05-06 Thread KK
It would be easier for anyone to give you a precise answer if you can be
more specific about the steps you followed for installing solr/tomcat and
where exactly you got stuck.

KK

On Wed, May 6, 2009 at 11:58 AM, uday kumar maddigatla wrote:

>
> Hi,
>
> I'm new to this Solr. I got distribution of Solr. i placed the war file in
> tomcat/webapps.
>
> After that i don't know what to do. I got confused while reading The
> instalation notes which is given in wiki .
>
> What is the next step to run the Solr.
>
> I really got confused with the lines in wiki.
>
> Please help me with instalation instructions.
> --
> View this message in context:
> http://www.nabble.com/unable-to-run-the-solr-in-tomcat-5.0-tp23400759p23400759.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>