Synonyms and Regions Taxonomy

2012-07-05 Thread Stephen Lacy
When a user types in South America they want to be able to see documents
containing Brazil, Chile etc.
No I have already thrown together a list of countries and continents
however I'm a little more ambitious,
I would like to get a lot more regions such as american states as well or
Former members of the USSR...
Are there ready made synonym files or taxonomies in a different format.
Are synonyms the best way of achieving this? Perhaps there is a better way?
Any pitfalls or advice on this subject from someone who has done this
before would be appreciated.
Thanks

Stephen


WordDelimiterFilter removes ampersands

2012-07-04 Thread Stephen Lacy
If a user writes a query Apples  Oranges the word delimiter filter
factory will change this into Apples Oranges
Which isn't very useful for me as I'd prefer especially when the phrase is
wrapped in quotes that the original is preserved.
However I still want to be able to separate ApplesOranges into Apples 
Oranges so preserveOriginal isn't really useful.
What I really would like to be able to do is tell WordDelimeterFilter to
treat it like it's neither alpha nor numeric, however
that doesn't mean that you remove it completely.

Thanks for your help
Stephen


Re: WordDelimiterFilter removes ampersands

2012-07-04 Thread Stephen Lacy
 solr.**PatternReplaceCharFilterFactor**y  is a brilliant idea, thanks so
much :)

On Wed, Jul 4, 2012 at 2:46 PM, Jack Krupansky j...@basetechnology.comwrote:

 That's a perfectly reasonable request. But, WDF doesn't have such a
 feature.

 Maybe what is needed is a distinct ampersand filter that runs before WDF
 and detects ampersands that are likely shorthands for and and expands
 them. It would also need to be able to detect ATT (capital letter before
 the ) and not expand it (and you can set up a character type table for WDF
 that treats  as a letter. A single  could also be expanded to and -
 that could also be done with the synonym filter, but that would not help
 you with the embedded  of ApplesOranges.

 Maybe a simple character filter that always expands  to  and  would
 be good enough for a lot of common cases, as a rough approximation.

 Maybe solr.**PatternReplaceCharFilterFactor**y could be used to
 accomplish that. Match  and replace with  and .

 -- Jack Krupansky

 -Original Message- From: Stephen Lacy
 Sent: Wednesday, July 04, 2012 8:16 AM
 To: solr-user@lucene.apache.org
 Subject: WordDelimiterFilter removes ampersands


 If a user writes a query Apples  Oranges the word delimiter filter
 factory will change this into Apples Oranges
 Which isn't very useful for me as I'd prefer especially when the phrase is
 wrapped in quotes that the original is preserved.
 However I still want to be able to separate ApplesOranges into Apples 
 Oranges so preserveOriginal isn't really useful.
 What I really would like to be able to do is tell WordDelimeterFilter to
 treat it like it's neither alpha nor numeric, however
 that doesn't mean that you remove it completely.

 Thanks for your help
 Stephen



DIH + JNDI

2012-04-18 Thread Stephen Lacy
Hi All,

I'm new to solr and I don't have much experience in java.
I'm trying to setup two environments with configuration files that mirror
each other
so that it's easy to copy files across after changes have been made.
The problem is that they both access different sql servers. So I want to
separate
the data source from the data-import.xml.

I'm trying to do that with JNDI following this doc
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

I put the datasource as a resource in
my /etc/tomcat6/Catalina/localhost/solr.xml (Context)

Resource name=jdbc/DATABASENAME auth=Container type=JdbcDataSource
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

url=jdbc:sqlserver://SQLSERVERNAME;databaseName=DATABASENAME;responseBuffering=adaptive;
user=USERNAME
password=PASSWORD /

and the resource ref in /var/lib/tomcat6/webapps/solr/WEB-INF/web.xml

 resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/DATABASENAME/res-ref-name
  res-typeJdbcDataSource/res-type
  res-authContainer/res-auth
  /resource-ref


Then I changed the data-config.xml to

dataSource
  jndiName=java:comp/env/jdbc/DATABASENAME
  type=JdbcDataSource
  user= password=/

I restart the server and try to do a delta import and I get the following:

SEVERE: Delta Import Failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute query: select 1 as report_id Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.init(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextModifiedRowKey(SqlEntityProcessor.java:84)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextModifiedRowKey(EntityProcessorWrapper.java:262)
at
org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:893)
at
org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:285)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:179)
at
org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:390)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:429)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)
Caused by: javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:140)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.init(JdbcDataSource.java:240)
... 11 more

I've tried a couple of different alterations, I've only really succeeded in
changing the error I get.
Anyone know how fix this issue? I'm kind of lost here.

Stephen


New to SOLR, installation issue

2011-08-29 Thread Stephen Lacy
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

Just started working with SOLR here.

I'm currently trying to replicate the live environment so I have a
better understanding of the system.

My first thought was that it would be so much easier if I stuck with
the binaries that are already in the ubuntu-server (not my choice)
package repos rather than compiling from source and having to manually
update each time.

However because the live environment uses a different version it's
harder to find out how it's configured.

The live is also multicore which works fine on the dev except if there
is any issue with any configuration is simply displays the index.jsp
page on http://MYDEVSOLR:8080/solr as if it's running single core.

It's running under tomcat6 but the errors don't appear to be in the
tomcat6 logs

The current thing that is causing an issue is clustering. I pulled
down the 1.4.1 source code and followed the instructions on
http://wiki.apache.org/solr/ClusteringComponent to install the
clusteringcomponent although the jars I copied were in
contrib/clustering/lib and contrib/clustering/lib/downloads to
/usr/share/solr/WEB-INF/lib
If I leave it there it throws an error when I go to
http://MYDEVSOLR:8080/solr saying that clustering component isn't
installed.
If I then add -Dsolr.clustering.enabled=true to $CATALINA_OPTS by
typing CATALINA_OPTS= -Dsolr.clustering.enabled=true at the bottom
of /etc/default/tomcat6 then it goes back to displaying as if there is
only one core.

Would appreciate any help or direction anyone can offer.
Thanks in advance

Stephen
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOW35yAAoJEDZ6quc9XS1uQGMH/iowkSFiJ+BMc8R+2pI8C4kr
snpFH/VzXb0dEo9pPnOcLWm+iBvBSYquWjE6+KwSr+xVLGI3SsrBBZd8pcr2TLiN
i+d6arkfMcyqyyOHko223riqKCWan37WIk4b4zE6S/ByGSbznebPwyRkES6dyBgV
JTA5+YQSfoi9JYk9PPbMUcUBRhMpfIdQEgwm3PWFzhcL0uYkLj7PvWwTAZX7a4pu
oIpg/uzLPPa4Jyp1veSQXaCbPG4+EfPrcePzSJjDR1iT0BRz4s8dPOogs0uILD9Z
Xi+gJ1toGgJieDAmfxpOuMdzfFBHU8svpUcn+Z3VBkdiqAOWQFybKqlbc00Hu3E=
=51Ur
-END PGP SIGNATURE-