Re: Tomcat JNDI and CWD Configuration problem with multiple solrs

2008-04-19 Thread Albert Ramstedt
OMG!

I found the error. I cant believe how much time i spent on this and it turns
out i should pay more attention. (Or really, I can believe, because it
happens more frequently than I wish it would).

Anyway, for those having the same issue in the future:

I am using acts_as_solr, a rails plugin for solr searching. And to set up
solr for my railsapp I blindly copied the solrconfig.xml from the plugin to
my solr/conf dir and installed the jndi context into tomcat and expected it
to work. What I experienced was that it then proceeded to create a
solr/index dir under cwd. This because the solrconfig.xml in acts_as_solr
has this line in the config:

 ${solr.data.dir:./solr/data}

It seems this creates the datadir under cwd. And it is probably not wanted
when you install it on a systemwide tomcat app server. Problem solved when i
commented that line out.

Hopefully this will save future acts_as_solr users some pain.

Albert

On Sat, Apr 19, 2008 at 12:05 AM, Chris Hostetter <[EMAIL PROTECTED]>
wrote:

>
> : The apps seem to work fine, only for some reason, when I start tomcat it
> : creates a solr dir in the cwd. So naturally, depending on where i do the
>
> Solr does not ever attempt to create a directory named "solr" (the only
> directories Solr tries to create if they don't already exist are inside
> of hte data dir)
>
> : restart, it wont work. If i cd to some dir where I have write access,
> the
> : apps goes up fine, and it even says the solr/home is where it should be.
>
> so what get's put in this solr dir that is created for you?  my guess is
> it's the expanded war file -- there is probably a tomcat setting for where
> these should go, and your tomcat configs have it as "."
>
> : (The dir i defined in the xml file, NOT cwd). But under statistics, both
> : separate solr apps seems to use an IndexReader under CWD. Ideally I
> would
>
> can you be more explicit about what exactly you are seeing (ie: cut+paste
> the log messages from Solr startup about solr home nad JNDI, cut+paste
> exactly what you see on the statistics page, etc..., cut+paste the shell
> commands you are running -- starting with a call to pwd so we know what
> the current directory is, cut+paste the directory listings of each
> directory you ae refering to.)
>
> : my own install of tomcat 6. (Although I dont understand why the example
> has
> : "f:/" stuff in the directory paths, since that notation throws errors at
> me.
>
> That's just an example of a windows path.
>
>
> -Hoss
>
>


Re: Highlighted field gets truncated

2008-04-19 Thread Christian Wittern

Mike Klaas wrote:


Fragments are generated independently from matching (I realize this 
isn't an ideal algorithm).


So it could be that the match is not part of the fragment?  This sounds 
a bit strange.  Is there a way to make sure the fragment contains the 
match other than returning the whole field and do the fragmenting myself?




Fragments are returned as an xml list; you can combine them together 
however you like in client code.  Solr can merge adjacent fragments 
for you if you wish.



I see.  That is great.

Thanks,  Christian

--

Christian Wittern 
Institute for Research in Humanities, Kyoto University

47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN



RE: indexing text containing xml tags

2008-04-19 Thread Norskog, Lance
We wrap everything in CDATA tags. Works great. 

-Original Message-
From: Shalin Shekhar Mangar [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 18, 2008 10:41 PM
To: [EMAIL PROTECTED]
Cc: solr-user@lucene.apache.org
Subject: Re: indexing text containing xml tags

CC'ing the solr-user mailing list because that is the right list for
usage questions.
You'll need to XML encode your title field. Basically you need to
replace '<' with < etc, then you will be able to index them.

On Sat, Apr 19, 2008 at 10:54 AM, Saurabh Kataria <[EMAIL PROTECTED]>
wrote:

>
> Hi everyone,
>
> I am having a problem while indexing my document. A very typical field

> of my document looks like:
>
> pKa Values of the Opened

> Form of a Thieno-1,2,4-triazolo-1,4-diazepine in Water
>
> solr has a problem indexing this because of the xml tags. I was 
> wondering if there is any way that I can index this field "title" 
> without stripping off my tags. If anyone could help me out, that wld
be great.
>
> Thanks,
> SK.
>



--
Regards,
Shalin Shekhar Mangar.