Problem installing Solr-4.0 in Linux

2012-11-29 Thread dm_tim
Howdy,

I'm having rather a lot of difficulty getting Solr 4.0 running under Linux
(I got it up-and-running under Windows very quickly). My web server is
Glassfish 3.1.1. Additonally, my solr/home dir is /opt/solr/solr-4.0 and my
data dir is /opt/solr/data .

When I deploy the solr war file or restart glassfish I get the following
exception: 
[#|2012-11-29T15:42:10.439-0800|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=25;_ThreadName=Thread-2;|StandardWrapperValve[LoadAdminUI]:
PWC1406: Servlet.service() for servlet LoadAdminUI threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringEscapeUtils

This makes no sense to me as that class is inside the war file. At this
point I have no idea what to do to get past this. I've been hammering at
this for quite some time now. Any suggestions?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Problem-installing-Solr-4-0-in-Linux-tp4023357.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr 4.1.0 index leaving write.lock file

2013-02-01 Thread dm_tim
Howdy,
I've been using Solr 4.1.0 for a little while now and I just noticed that
when I index any core I have the write.lock file doesn't go away until I
stop the server where solr is running. The data I'm indexing is fairly small
(16k rows in a db) so it shouldn't take much time at all though I have
waited upwards of 15 minutes for the lock files to clear. Is there something
I'm missing here?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-1-0-index-leaving-write-lock-file-tp4038046.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.1.0 index leaving write.lock file

2013-02-01 Thread dm_tim
Well that makes sense. The problem is that I am working in both Solr and
Lucene directly. I have some indexes that work great in Solr and now I want
to do the same thing in Java using the Lucene libs. So I'm writing to the
same index dir. I do testing by creating an index in Solr, look at it, and
then attempt to recreate it using Lucene. However the lock file was killing
me. Is there any way around this?

T



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-1-0-index-leaving-write-lock-file-tp4038046p4038055.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.1.0 index leaving write.lock file

2013-02-01 Thread dm_tim
Cool. I can use that setting while testing then set it back when I'm just
running Lucene. Many thanks folks!

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-1-0-index-leaving-write-lock-file-tp4038046p4038060.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solrj how to use TrieDoubleField

2013-02-07 Thread dm_tim
Howdy,

I have a Solr implementation that allows me to do a geospatial search and
I'm trying to replicate it using the solrj libs. The schema.xml that I'm
using looks like this:

  








   

 
   
   

 
   
  

  

 
  
  

 
  

  


  

   
   
   
   
   
   
   
   
   
   
 
 
 
 id

 
 name

 
 


And it works perfectly. Now I'm trying to write code to create an index
using the same fields. I have previously created other indexes just fine (by
creating an Analyzer and an IndexWriter and writing Document objects) and I
will be reusing the same Analyzer I used before. The problem specifically
lies in creating the field (a TrieDoubleField) for the lat/lon data. Is
there an example of that somewhere that I could plagiarize?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solrj-how-to-use-TrieDoubleField-tp4039083.html
Sent from the Solr - User mailing list archive at Nabble.com.


Query question

2013-02-14 Thread dm_tim
Howdy,

I have a straight-forward index that contains a "name" field. I am currently
taking a string of text, tokenizing it into individual strings and making a
query out of them all against the "name" field.

Note that the name field is split up by a whitespace tokenizer and a lower
case filter during indexing.

My query is working fine but I want to boost the score when multiple terms
match. So for example if I had an entry in my index that was originally
"Valley Fair Mall" and the string I was using to search was "I'm shopping at
Valley Fair mall" my query is currently being chopped into:
name:i'm~ name:shopping~ name:at~ name:valley~ name:fair~ name:mall~

Note that I use OR by default. 

So as I said, the search result I want is the one with the highest score,
but I was hoping to find a way to boost the score based on the number of
terms it finds (or matches well) so that I can differentiate between a close
match and nowhere near. Any suggestions?

Regards,

T



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-question-tp4040559.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr 3.6.0 problem with multi-core and json

2012-05-18 Thread dm_tim
Howdy,

I have a multi-core set up in Solr 3.6.0 which works fine. That is until I
request the response in json with the "wt=json" parameter. When I do that it
looks like its using the schema.xml file of one of my other cores because it
complains that it can not get a required field that exists in the schema.xml
of one of the other cores.

Has anyone seen this issue before? If so what was the fix. I'm spending far
too much time trying to convert the default xml response into json. I'd like
to have the response returned in json.

Regards,

Tim


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-3-6-0-problem-with-multi-core-and-json-tp3984790.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 3.6.0 problem with multi-core and json

2012-05-18 Thread dm_tim
I should clarify the error a bit. When I make a select request on my first
core (called core0) using the wt=json parameter I get a 400 response with
the explanation "undefined field: gid". The field gid is not defined in the
schema.xml file of my first core. But, it is defined in the schema.xml file
of my third core (core2). Hopefully, this is a slightly better explanation
of the problem.

T



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-3-6-0-problem-with-multi-core-and-json-tp3984790p3984793.html
Sent from the Solr - User mailing list archive at Nabble.com.


Where can I find an example of a 4.0 contraction file?

2012-11-01 Thread dm_tim
I'm attempting to get a working example of v4 running and I apparently need a
contractions_ca.txt file. I have been unsuccessful locating an example of
this file. Could someone please point me to one?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Where-can-I-find-an-example-of-a-4-0-contraction-file-tp4017699.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Where can I find an example of a 4.0 contraction file?

2012-11-01 Thread dm_tim
I should have mentioned I tried that. I get the following exception:
SEVERE: Unable to create core: core0
java.lang.RuntimeException: java.nio.charset.MalformedInputException: Input
length = 1

Any other suggestions?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Where-can-I-find-an-example-of-a-4-0-contraction-file-tp4017699p4017705.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Where can I find an example of a 4.0 contraction file?

2012-11-01 Thread dm_tim
Apparently there is some problem in some of my other configuration files that
was tripping me up. When I copy all of the configuration files from the 4.0
source I can start up. Now I'll start messing with the files one at a time
and see what happens

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Where-can-I-find-an-example-of-a-4-0-contraction-file-tp4017699p4017715.html
Sent from the Solr - User mailing list archive at Nabble.com.


Puzzled by search score

2012-11-02 Thread dm_tim
Howdy,
I'm reading a table in a db using the following schema:

  

   
   
   
   
   
   
   
   
   
 
 
 
 id

 
 tag

 
 

So make the following query 
http://localhost:8080/apache-solr-4.0.0/core0/select?q=tag%3Aclothes~%2Bcid%3A14&sort=score+desc&rows=10&fl=tag+score&wt=json&indent=true

You will notice that I'm doing a search on the tag field against the string
"clothes" and the cid field against the long 14 and requesting that the
results come back sorted on descending score values. So I'm surprised to see
these results:
{
  "responseHeader":{
"status":0,
"QTime":1,
"params":{
  "q":"tag:clothes~+cid:14",
  "sort":"score desc",
  "rows":"10",
  "fl":"tag score",
  "wt":"json",
  "indent":"true"}},
  "response":{"numFound":1835,"start":0,"maxScore":3.9238024,"docs":[
  {
"tag":"Table Cloth",
"score":3.9238024},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Clothes",
"score":3.9134552},
  {
"tag":"Boys Clothes",
"score":3.3968315},
  {
"tag":"Everyday Clothes",
"score":3.3968315},
  {
"tag":"Designer Clothes",
"score":3.3968315}]
  }}

Why does "Table Cloth" have a higher score than "Clothes" (which is an exact
textual match)? I could use some help understanding why I have these results
and how to tweak my query so that the results match my expectations.

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Puzzled-by-search-score-tp4017904.html
Sent from the Solr - User mailing list archive at Nabble.com.


4.0 query question

2012-11-09 Thread dm_tim
Howdy,

I have a Solr query that is almost perfect:
http://localhost:8080/apache-solr-4.0.0/v3_tag_core/select?q=tag%3A%22coat%22%5E4+%22coat%22+cid%3A136+&sort=score+desc&rows=10&fl=id+tag+cid+file_version+lang+score&wt=json&indent=true&debugQuery=true

It's grabbing data that includes the fields: id, tag, cid, file_version,
lang, and score AND sorting them by score descending. Excellent! However, I
need to figure out how to have the query only return rows with the same cid
that have the highest file_version. For example if it finds two rows with
the same cid and one has file_version 14 and another with file version 10,
it should toss out the one with file version 10. Note that there may be
multiple rows with the same file_version and I'd like all of them with the
highest file_version.

I just can't find an explanation for this in the docs. Any help would be
appreciated.

Regards,

Tim





--
View this message in context: 
http://lucene.472066.n3.nabble.com/4-0-query-question-tp4019397.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: 4.0 query question

2012-11-09 Thread dm_tim
I think I may have found my answer buy I'd like additional validation:
I believe that I can add a function to my query to get only the highest
values of 'file_version' like this -
_val_:"max(file_version, 1)"

I seem to be getting the results I want. Does this look correct?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/4-0-query-question-tp4019397p4019426.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: 4.0 query question

2012-11-12 Thread dm_tim
That is terrific. Thanks.

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/4-0-query-question-tp4019397p4019890.html
Sent from the Solr - User mailing list archive at Nabble.com.


4.0 query question

2012-11-12 Thread dm_tim
I just discovered the idf scoring component and it's biting me on the butt.
In the particular case I have all terms are equally relevant. Is there any
way to turn off idf scoring?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/4-0-query-question-tp4019898.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr 4.0 Dismax woes (2 specifically)

2012-11-13 Thread dm_tim
Heck,

I originally started using the default query parser but gave up on it
because all of my search results are equally important and idf was messing
up my results pretty badly. So I discovered the DisMax query parser which
doesn't use idf. I was elated until I started testing. My initial results
looked good but when I cut down the query string from "clothes" to "clot" I
got zero results. 

I've been reading about how disMax is supposed to do fuzzy searches but I
can't make it work at all. 

To complicate matters I discovered that my all of my search words are being
used against all of the query fields. I had previously assumed that each
search word would only be applied to individual query fields. 

So for example my q is:
clothe 95

And my qf:
tag cid

So I believe that the words "clothe" and "95" are being searched on both
fields ("tag" and "cid") which is not what I wanted to do. I was hoping to
have "cloth" applied only to the "tag" field and "95" applied only to the
"cid" field.

I really don't have it in me to write my own query parser so I'm hoping to
find a way to do a fuzzy search without scores being screwed by idf. Is
there a way to achieve my desired results with existing code?

Regards,

(A tired) Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-0-Dismax-woes-2-specifically-tp4020197.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr v4: Synonyms... better at index time or query time?

2012-11-13 Thread dm_tim
Good to know. Thanks.

T



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-v4-Synonyms-better-at-index-time-or-query-time-tp4020179p4020198.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr 4.0 Spatial Search schema.xml and data-config.xml

2012-11-14 Thread dm_tim
Howdy,

I now want to try my hand a spatial search. It looks fairly easy but I'm a
bit puzzled about how to set up my schema.xml file. I know that my field
must use the LatLon type but the columns of the database where I'll be
pulling my data for indexing have separate lat and lon columns (both
double). 

I can't figure out how to write my entity tag in my data-config.xml to take
the two columns lon and lat (both double) and combine them so that I can put
them into a LonLat field. I haven't had much luck finding an example. Is
there one out there?

Regards,

Tim



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-0-Spatial-Search-schema-xml-and-data-config-xml-tp4020376.html
Sent from the Solr - User mailing list archive at Nabble.com.