Basic Authentication for Admin GUI

2014-06-18 Thread Thomas Fischer
Hello,

I'm trying to set up a basic authentication for the admin function in the new 
solr GUI.
For this I have to give the appropriate url-pattern, e.g.
url-pattern//url-pattern
will match every URL in my solr server.
But the GUI now runs all administrative tasks under /#/ and there is no 
particular /admin/ branch anymore.
Does anybody know how to deal with that situation?
Can I move the administration to a new admin directory?

Best regards
Thomas Fischer





Configuration problem

2014-03-03 Thread Thomas Fischer
Hello,

for some reason I have problems to get my local solr system to run (MacBook, 
tomcat 6.0.35).

The setting is
solr directories (I use different solr versions at the same time):
/srv/solr/solr4.6.1 is the solr home, in solr home is a file solr.xml of the 
new discovery type (no cores), and inside the core directories are empty 
files core.properties and symbolic links to the universal conf directory.
 
solr webapps (I use very different webapps simultaneously):
/srv/www/webapps/solr/solr4.6.1 is the solr webapp

I tried to convey this information to the tomcat server by putting a file 
solr4.6.1.xml into the cataiina/localhost folder with the contents
?xml version=1.0 encoding=utf-8?
Context docBase=/srv/www/webapps/solr/solr4.6.1 debug=0 
crossContext=true
Environment name=solr/home type=java.lang.String 
value=/srv/solr/solr4.6.1 override=true/
/Context

The Tomcat Manager shows solr4.6.1 as started, but following the given link 
gives an error with the message:
SolrCore 'collection1' is not available due to init failure: Could not load 
config file /srv/solr4.6.1/collection1/solrconfig.xml
which is plausible, since
1. there is no folder /srv/solr4.6.1/collection1 and
2.for the actual cores solrconfig.xml is inside of 
/srv/solr4.6.1/cores/geo/conf/

But why does Tomcat try to find a solrconfig.xml there?
The problem persists if I start tomcat with 
-Dsolr.solr.home=/srv/solr/solr4.6.1, it seems that the system just ignores the 
solr home setting.

Can somebody give me a hint what I'm doing wrong?

Best regards
Thomas

P.S.: Is there a way to stop Tomcat from throwing these errors into my face 
threefold: once as heading (h1!), once as message and once as description?




Re: Configuration problem

2014-03-03 Thread Thomas Fischer
Am 03.03.2014 um 22:43 schrieb Shawn Heisey:

 On 3/3/2014 9:02 AM, Thomas Fischer wrote:
 The setting is
 solr directories (I use different solr versions at the same time):
 /srv/solr/solr4.6.1 is the solr home, in solr home is a file solr.xml of the 
 new discovery type (no cores), and inside the core directories are empty 
 files core.properties and symbolic links to the universal conf directory.
  solr webapps (I use very different webapps simultaneously):
 /srv/www/webapps/solr/solr4.6.1 is the solr webapp
 
 I tried to convey this information to the tomcat server by putting a file 
 solr4.6.1.xml into the cataiina/localhost folder with the contents
 ?xml version=1.0 encoding=utf-8?
 Context docBase=/srv/www/webapps/solr/solr4.6.1 debug=0 
 crossContext=true
  Environment name=solr/home type=java.lang.String 
 value=/srv/solr/solr4.6.1 override=true/
 /Context
 
 Your message is buried deep in another message thread about NoSQL, because 
 you replied to an existing message rather than starting a new message to 
 solr-user@lucene.apache.org.  On list-mirroring forums like Nabble, nobody 
 will even see your message (or this reply) unless they actually open that 
 other thread.  This is what it looks like on a threading mail reader 
 (Thunderbird):
 
 https://www.dropbox.com/s/87ilv7jls7y5gym/solr-reply-thread.png

Yes, I'm sorry, I only afterwards realized that my question inherited the 
thread from the E-Mail I was reading and using as a template for the answer.

Meanwhile I figured out that I overlooked the third place to define solr home 
for Tomcat (after JAVA_OPTS and JNDI): web.xml in WEB-INF of the given webapp.
This overrides the other definitions and created the impression that I couldn't 
set  solr home.

But now I get the message
Could not load config file /srv/solr/solr4.6.1/cores/geo/solrconfig.xml
for the core geo.
In the solr wiki I read (http://wiki.apache.org/solr/ConfiguringSolr):
In each core, Solr will look for a conf/solrconfig.xml file and expected solr 
to look for
/srv/solr/solr4.6.1/cores/geo/conf/solrconfig.xml (which exists), but obviously 
it doesn't.
Why? My misunderstanding?

Best
Thomas





solrconfig.xml

2014-03-03 Thread Thomas Fischer
Hello,

I'm sorry to repeat myself but I didn't manage to get out of the thread I 
inadvertently slipped into.

My problem now is this:
I have a core geo (with an empty file core.properties inside) and 
solrconfig.xml at
/srv/solr/solr4.6.1/cores/geo/conf/solrconfig.xml
following the hint from the solr wiki  
(http://wiki.apache.org/solr/ConfiguringSolr):
In each core, Solr will look for a conf/solrconfig.xml file
But I get the error message:
Could not load config file /srv/solr/solr4.6.1/cores/geo/solrconfig.xml
Why? My misunderstanding?

Best
Thomas


Problems with ICUCollationField

2014-02-19 Thread Thomas Fischer
Hello,

I'm migrating to solr 4.6.1 and have problems with the ICUCollationField 
(apache-solr-ref-guide-4.6.pdf, pp. 31 and 100).

I get consistently the error message 
Error loading class 'solr.ICUCollationField'.
even after
INFO: Adding 'file:/srv/solr4.6.1/contrib/analysis-extras/lib/icu4j-49.1.jar' 
to classloader
and
INFO: Adding 
'file:/srv/solr4.6.1/contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-4.6.1.jar'
 to classloader.

Am I missing something?

I solr's subversion I found
/SVN/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
but no corresponding class in solr4.6.1's contrib folder.

Best
Thomas



Re: Problems with ICUCollationField

2014-02-19 Thread Thomas Fischer
Hello Robert,

I already added
contrib/analysis-extras/lib/
and
contrib/analysis-extras/lucene-libs/
via lib directives in solrconfig, this is why the classes mentioned are loaded.

Do you know which jar is supposed to contain the ICUCollationField?

Best regards
Thomas



Am 19.02.2014 um 13:54 schrieb Robert Muir:

 you need the solr analysis-extras jar in your classpath, too.
 
 
 
 On Wed, Feb 19, 2014 at 6:45 AM, Thomas Fischer fischer...@aon.at wrote:
 
 Hello,
 
 I'm migrating to solr 4.6.1 and have problems with the ICUCollationField
 (apache-solr-ref-guide-4.6.pdf, pp. 31 and 100).
 
 I get consistently the error message
 Error loading class 'solr.ICUCollationField'.
 even after
 INFO: Adding
 'file:/srv/solr4.6.1/contrib/analysis-extras/lib/icu4j-49.1.jar' to
 classloader
 and
 INFO: Adding
 'file:/srv/solr4.6.1/contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-4.6.1.jar'
 to classloader.
 
 Am I missing something?
 
 I solr's subversion I found
 
 /SVN/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
 but no corresponding class in solr4.6.1's contrib folder.
 
 Best
 Thomas
 
 



Re: Problems with ICUCollationField

2014-02-19 Thread Thomas Fischer
Thanks, that helps!

I'm trying to migrate from the now deprecated ICUCollationKeyFilterFactory I 
used before to the ICUCollationField.
Is there any description how to achieve this?

First tries now yield

ICUCollationField does not support specifying an analyzer.

which makes it complicated since I used the ICUCollationKeyFilterFactory to 
standardize my text fields (in particular because of German Umlauts).
But an ICUCollationField without LowerCaseFilter, a WhitespaceTokenizer, a 
LetterTokenizer, etc. doesn't do me much good, I'm afraid.
Or is this somehow wrapped into the ICUCollationField?

I didn't find ICUCollationField  in the solr wiki and not much information in 
the reference.
And the hint

solr.ICUCollationField is included in the Solr analysis-extras contrib - see 
solr/contrib/analysis-extras/README.txt for instructions on which jars you need 
to add to your SOLR_HOME/lib in order to use it.

is misleading insofar as this README.txt doesn't mention the 
solr-analysis-extras-4.6.1.jar in dist.

Best
Thomas


Am 19.02.2014 um 14:27 schrieb Robert Muir:

 you need the solr analysis-extras jar itself, too.
 
 
 
 On Wed, Feb 19, 2014 at 8:25 AM, Thomas Fischer fischer...@aon.at wrote:
 
 Hello Robert,
 
 I already added
 contrib/analysis-extras/lib/
 and
 contrib/analysis-extras/lucene-libs/
 via lib directives in solrconfig, this is why the classes mentioned are
 loaded.
 
 Do you know which jar is supposed to contain the ICUCollationField?
 
 Best regards
 Thomas
 
 
 
 Am 19.02.2014 um 13:54 schrieb Robert Muir:
 
 you need the solr analysis-extras jar in your classpath, too.
 
 
 
 On Wed, Feb 19, 2014 at 6:45 AM, Thomas Fischer fischer...@aon.at
 wrote:
 
 Hello,
 
 I'm migrating to solr 4.6.1 and have problems with the ICUCollationField
 (apache-solr-ref-guide-4.6.pdf, pp. 31 and 100).
 
 I get consistently the error message
 Error loading class 'solr.ICUCollationField'.
 even after
 INFO: Adding
 'file:/srv/solr4.6.1/contrib/analysis-extras/lib/icu4j-49.1.jar' to
 classloader
 and
 INFO: Adding
 
 'file:/srv/solr4.6.1/contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-4.6.1.jar'
 to classloader.
 
 Am I missing something?
 
 I solr's subversion I found
 
 
 /SVN/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
 but no corresponding class in solr4.6.1's contrib folder.
 
 Best
 Thomas
 
 
 
 



Re: Problems with ICUCollationField

2014-02-19 Thread Thomas Fischer

 Hmm, for standardization of text fields, collation might be a little
 awkward.

I arrived there after using custom rules for a while (see RuleBasedCollator 
on http://wiki.apache.org/solr/UnicodeCollation) and then being told
For better performance, less memory usage, and support for more locales, you 
can add the analysis-extras contrib and use ICUCollationKeyFilterFactory 
instead. (on the same page under ICU Collation).

 For your german umlauts, what do you mean by standardize? is this to
 achieve equivalency of e.g. oe to ö in your search terms?

That is the main point, but I might also need the additional normalization of 
combined characters like
o+  ̈ = ö and probably similar constructions for other languages (like 
Hungarian).

 In that case, a simpler approach would be to put
 GermanNormalizationFilterFactory in your chain:
 http://lucene.apache.org/core/4_6_1/analyzers-common/org/apache/lucene/analysis/de/GermanNormalizationFilter.html

I'll see how far I get with this, but from the description
• 'ä', 'ö', 'ü' are replaced by 'a', 'o', 'u', respectively.
• 'ae' and 'oe' are replaced by 'a', and 'o', respectively.
this seems to be too far-reaching a reduction: while the identification ä=ae 
is not very serious and rarely misleading, ä=a might pack words together that 
shouldn't be, Äsen and Asen are quite different concepts,

In general, the deprecation of ICUCollationKeyFilterFactory doesn't seem to be 
really thought through.

Thanks anyway, best
Thomas

 
 On Wed, Feb 19, 2014 at 9:16 AM, Thomas Fischer fischer...@aon.at wrote:
 
 Thanks, that helps!
 
 I'm trying to migrate from the now deprecated ICUCollationKeyFilterFactory
 I used before to the ICUCollationField.
 Is there any description how to achieve this?
 
 First tries now yield
 
 ICUCollationField does not support specifying an analyzer.
 
 which makes it complicated since I used the ICUCollationKeyFilterFactory
 to standardize my text fields (in particular because of German Umlauts).
 But an ICUCollationField without LowerCaseFilter, a WhitespaceTokenizer, a
 LetterTokenizer, etc. doesn't do me much good, I'm afraid.
 Or is this somehow wrapped into the ICUCollationField?
 
 I didn't find ICUCollationField  in the solr wiki and not much information
 in the reference.
 And the hint
 
 solr.ICUCollationField is included in the Solr analysis-extras contrib -
 see solr/contrib/analysis-extras/README.txt for instructions on which jars
 you need to add to your SOLR_HOME/lib in order to use it.
 
 is misleading insofar as this README.txt doesn't mention the
 solr-analysis-extras-4.6.1.jar in dist.
 
 Best
 Thomas
 
 
 Am 19.02.2014 um 14:27 schrieb Robert Muir:
 
 you need the solr analysis-extras jar itself, too.
 
 
 
 On Wed, Feb 19, 2014 at 8:25 AM, Thomas Fischer fischer...@aon.at
 wrote:
 
 Hello Robert,
 
 I already added
 contrib/analysis-extras/lib/
 and
 contrib/analysis-extras/lucene-libs/
 via lib directives in solrconfig, this is why the classes mentioned are
 loaded.
 
 Do you know which jar is supposed to contain the ICUCollationField?
 
 Best regards
 Thomas
 
 
 
 Am 19.02.2014 um 13:54 schrieb Robert Muir:
 
 you need the solr analysis-extras jar in your classpath, too.
 
 
 
 On Wed, Feb 19, 2014 at 6:45 AM, Thomas Fischer fischer...@aon.at
 wrote:
 
 Hello,
 
 I'm migrating to solr 4.6.1 and have problems with the
 ICUCollationField
 (apache-solr-ref-guide-4.6.pdf, pp. 31 and 100).
 
 I get consistently the error message
 Error loading class 'solr.ICUCollationField'.
 even after
 INFO: Adding
 'file:/srv/solr4.6.1/contrib/analysis-extras/lib/icu4j-49.1.jar' to
 classloader
 and
 INFO: Adding
 
 
 'file:/srv/solr4.6.1/contrib/analysis-extras/lucene-libs/lucene-analyzers-icu-4.6.1.jar'
 to classloader.
 
 Am I missing something?
 
 I solr's subversion I found
 
 
 
 /SVN/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
 but no corresponding class in solr4.6.1's contrib folder.
 
 Best
 Thomas
 
 
 
 
 
 



Re: solr.home

2011-12-26 Thread Thomas Fischer
Hi Shawn,

thanks for looking into this.
I am using a start-up script for Tomcat, and in that script there was actually 
the line

export JAVA_OPTS=$JAVA_OPTS -Dsolr.solr.home='/srv/solr'

which most likely created the problem.
With

export JAVA_OPTS=$JAVA_OPTS -Dsolr.solr.home=/srv/solr

I get

INFO: No /solr/home in JNDI
INFO: using system property solr.solr.home: /srv/solr

and everything seems to work fine, so there obviously was a tightening of the 
syntax somewhere between solr 1.4 and solr 3.5.

Thanks again
Thomas


Am 22.12.2011 um 17:06 schrieb Shawn Heisey:

 On 12/21/2011 4:13 AM, Thomas Fischer wrote:
 I'm trying to move forward with my solr system from 1.4 to 3.5 and ran into 
 some problems with solr home.
 Is this a known problem?
 
 My solr 1.4 gives me the following messages (amongst many many others…) in 
 catalina.out:
 
 INFO: No /solr/home in JNDI
 INFO: using system property solr.solr.home: '/srv/solr'
 INFO: looking for solr.xml: /'/srv/solr'/solr.xml
 
 then finds the solr.xml and proceeds from there (this is multicore).
 
 With solr 3.5 I get:
 
 INFO: No /solr/home in JNDI
 INFO: using system property solr.solr.home: '/srv/solr'
 INFO: Solr home set to ''/srv/solr'/'
 INFO: Solr home set to ''/srv/solr'/./'
 SCHWERWIEGEND: java.lang.RuntimeException: Can't find resource '' in 
 classpath or ''/srv/solr'/./conf/', cwd=/
 
 After that solr is somehow started but not aware of the cores present.
 
 This can be solved by putting a solr.xml file into 
 $CATALINA_HOME/conf/Catalina/localhost/ with
 Environment name=solr/home type=java.lang.String value=/srv/solr 
 override=true /
 which results in
 INFO: Using JNDI solr.home: /srv/solr
 and everything seems to run smoothely afterwards, although solr.xml is never 
 mentioned.
 
 I would like to know when this changed and why, and why solr 3.5 is looking 
 for solrconfig.xml instead of solr.xml in solr.home
 
 (Am I the only one who finds it confusing to have the three names 
 solr.solr.home (system property),  solr.home (JNDI), solr/home (Environment 
 name) for the same object?)
 
 Here's what I have as a commandline option when starting Jetty:
 
 -Dsolr.solr.home=/index/solr
 
 This is what my log from Solr 3.5.0 says at the very beginning.
 
 Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
 INFO: JNDI not configured for solr (NoInitialContextEx)
 Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
 INFO: using system property solr.solr.home: /index/solr
 Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader init
 INFO: Solr home set to '/index/solr/'
 
 Note that in my log it shows the system property without any kind of quotes, 
 but in yours, it is surrounded - '/srv/solr'.  I am guessing that wherever 
 you are defining solr.solr.home, you have included those quotes, and that 
 removing them would probably fix the problem.
 
 If this is indeed the problem, the newer version is probably interpreting 
 input values much more literally, the old version probably ran the final path 
 value through a parser that took care of removing the quotes for you, but 
 that parser also removed certain characters that some users actually needed.  
 Notice that the quotes are interspersed in the full solr.xml path in your 1.4 
 log.
 
 Thanks,
 Shawn
 



solr.home

2011-12-21 Thread Thomas Fischer
Hello,

I'm trying to move forward with my solr system from 1.4 to 3.5 and ran into 
some problems with solr home.
Is this a known problem?

My solr 1.4 gives me the following messages (amongst many many others…) in 
catalina.out:

INFO: No /solr/home in JNDI
INFO: using system property solr.solr.home: '/srv/solr'
INFO: looking for solr.xml: /'/srv/solr'/solr.xml

then finds the solr.xml and proceeds from there (this is multicore).

With solr 3.5 I get:

INFO: No /solr/home in JNDI
INFO: using system property solr.solr.home: '/srv/solr'
INFO: Solr home set to ''/srv/solr'/'
INFO: Solr home set to ''/srv/solr'/./'
SCHWERWIEGEND: java.lang.RuntimeException: Can't find resource '' in classpath 
or ''/srv/solr'/./conf/', cwd=/

After that solr is somehow started but not aware of the cores present.

This can be solved by putting a solr.xml file into 
$CATALINA_HOME/conf/Catalina/localhost/ with
Environment name=solr/home type=java.lang.String value=/srv/solr 
override=true /
which results in
INFO: Using JNDI solr.home: /srv/solr
and everything seems to run smoothely afterwards, although solr.xml is never 
mentioned.

I would like to know when this changed and why, and why solr 3.5 is looking for 
solrconfig.xml instead of solr.xml in solr.home

(Am I the only one who finds it confusing to have the three names 
solr.solr.home (system property),  solr.home (JNDI), solr/home (Environment 
name) for the same object?)

Best
Thomas

wildcard search: Update

2011-07-02 Thread Thomas Fischer
Hello,

I'm still struggling with wildcard search in solr.
I installed the ComplexPhraseQueryParser which essentially accomplishes what 
I'm looking for: I can search in my field GOK using phrases with wildcards, 
e.g. GOK:POF 15?.
This works with either solr 1.4.2 or 3.3.
What irritates me is that this kind of a search throws an exception when there 
is *no* space, e.g. for GOK:POF15?  (useless) or DDC:942.? (meaningful). On 
the other hand, the search will work if the quotes are omitted: DDC:942.? 
yields the expected results.

An additional source of irritation is the error message:

The server encountered an internal error (Unknown query type 
org.apache.lucene.search.WildcardQuery found in phrase query string POF15? 
java.lang.IllegalArgumentException: Unknown query type 
org.apache.lucene.search.WildcardQuery found in phrase query string POF1?? 
at 
org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery.rewrite

I don' understand why the query type org.apache.lucene.search.WildcardQuery 
is unknown (this is contained in lucene-core-2.9.3.jar), nor what it means that 
it is 'found in phrase query string POF15?'

Can anybody give me a hint how to handle this problem (apart from erasing the 
quotes if no whitespace is present)?

Cheers
Thomas




Re: Solr 3.1 indexing error Invalid UTF-8 character 0xffff

2011-06-27 Thread Thomas Fischer
Hello,

Am 27.06.2011 um 12:40 schrieb Markus Jelsma:

 Hi,
 
 I came across the indexing error below. It happened in a huge batch update 
 from Nutch with SolrJ 3.1. Since the crawl was huge it is very hard to trace 
 the error back to a specific document. So i try my luck here: anyone seen 
 this 
 before with SolrJ 3.1? Anything else on the Nutch part i should have taken 
 care off?
 
 Thanks!
 
 
 Jun 27, 2011 10:24:28 AM org.apache.solr.core.SolrCore execute
 INFO: [] webapp=/solr path=/update params={wt=javabinversion=2} status=500 
 QTime=423 
 Jun 27, 2011 10:24:28 AM org.apache.solr.common.SolrException log
 SEVERE: java.lang.RuntimeException: [was class 
 java.io.CharConversionException] Invalid UTF-8 character 0x at char 
 #1142033, byte #1155068)
   at 
 com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18)

and loads of other rubbish and 

   ... 26 more


I see this as a problem of solr error-reporting. This is not only obnoxiously 
loud (white on grey with oversized fonts), but less useful than it should be.
Instead of telling the user where the error occurred (i.e. while reading which 
file, which column at which line) it unravels the stack. This is useless if the 
program just choked on some unexpected input, like a typo in a schema of config 
file or an invalid character in a file to be indexed.
I don't know if this is due to the Tomcat, the logging system of solr itself, 
but it is annoying.

And yes, I've seen something like this before and found the error not by 
inspecting solr but by opening the suspected files with an appropriate browser 
(e.g. Firefox) which tells me exactly where something goes wrong.

All the best
Thomas



Re: wildcard search

2011-06-11 Thread Thomas Fischer
Hi Ahmet,

 so I created a fake license
 ComplexPhrase-LICENSE-MIT.txt
 for ComplexPhrase and tried again, which ran through
 successfully, I hope this is OK.
 
 I didn't used it with solr 3.2. I will check about it. 
 
 So your GOK field already contains the list as multivalued. Then you can use 
 prefix query parser plugin for this. Just make sure that field type of GOK is 
 string not text.  
 q={!prefix f=GOK}IA 3   should be equivalent to  {!complexphrase}GOK:IA 3*

I'll try that. But my search requests come from a pazpar2 system and are 
directed against different clients, which all get requests of the form 
GOK:IA 32*, so in some sense this is better for me.

I found two problems:

– In the solr 1.4.2 version I'm testing the request IA 32* works, but GOK:IA 
32* will not. Is this somehow related to the indexing of that field?

– The other is that IA320 (on 1.4.2) and GOK:IA320 (on 3.2) will throw an 
exception:
description
The server encountered an internal error
(Unknown query type org.apache.lucene.search.PhraseQuery found in phrase 
query string IA620 java.lang.IllegalArgumentException: Unknown query type 
org.apache.lucene.search.PhraseQuery found in phrase query string IA620 at 
org.apache.lucene.queryParser.ComplexPhraseQueryParser

Cheers
Thomas




Re: wildcard search

2011-06-10 Thread Thomas Fischer
Hi Ahmet,

 I don't use it myself  (but I will soon), so I
 may be wrong, but did you try
 to use the ComplexPhraseQueryParser :
 
 ComplexPhraseQueryParser
   QueryParser which
 permits complex phrase query syntax eg (john
 jon jonathan~) peters*.
 
 It seems that you could do such type of queries :
 
 GOK:IA 38*
 
 yes that sounds interesting.
 But I don't know how to get and install it into solr. Cam
 you give me a hint?
 
 https://issues.apache.org/jira/browse/SOLR-1604

I tried to follow this recipe, adapting it to the solr 3.2 I am testing right 
now.
The first try gave me a message

 [java] !!! Couldn't get license file for 
/Installer/solr/apache-solr-3.2.0/solr/lib/ComplexPhrase-1.0.jar
 [java] At least one file does not have a license, or it's license name is 
not in the proper format.  See the logs.

BUILD FAILED

so I created a fake license
ComplexPhrase-LICENSE-MIT.txt
for ComplexPhrase and tried again, which ran through successfully, I hope this 
is OK.

I registered queryparser not to solrhome/conf/solrconfig.xml (no such thing, 
I'm running multiple cores) but to
solrhome/cores/lit/conf/solrconfig.xml
and could search successfully for
{!complexphrase}GOK:IC 62*

 But it seems that you can achieve what you want with vanilla solr.
 
 I don't follow the multivalued part in your example but you can tokenize 
 IA 300; IC 330; IA 317; IA 318 into these 4 tokens 
 
 IA 300
 IC 330
 IA 314
 IA 318

I didn't have to split them up, they are already separated as field with 
multiValued=true.
But I need to be able to search for IA 310 - IA 319 with one call,
{!complexphrase}GOK:IA 31?
will do this now, or even for 
{!complexphrase}GOK:IA 3*
to catch all those in one go.

Thanks, this helped a lot
Thomas



Re: wildcard search

2011-06-08 Thread Thomas Fischer
Hi Erick,

I have a multivalued field GOK (local classification scheme) with separate 
entries of the sort
 IA 300; IC 330; IA 317; IA 318, i.e. 1 to 3 capital characters, space, 3 
digits.
I want to be able to perform a truncated search on that field:
either just the string before the space, or a combination of that string with 1 
or 2 digits, something like:
GOK:IA
or
GOK:IA 3*
or
GOK:IA 31?
My problem is the clash between the phrase (GOK:IA 317 works) and the 
wildcards.

As a start I tried as type
fieldType name=text class=solr.TextField positionIncrementGap=100 
autoGeneratePhraseQueries=true
from the solr 3.2 distribution schema
(apache-solr-3.2.0/example/solr/conf/schema.xml),
the field is just
field name=GOK type=text multiValued=true/

BTW, I have another field DDC with entries of the form t1:086643 with 
analogous requirements which yields similar problems due to the colon, also 
indexed as text.
Here also 
DDC:T1\:086643
works, but not 
DDC:T1\:08664?

Thanks in advance
Thomas

 Yes there is, but you haven't provided enough information to
 make a suggestion. What isthe fieldType definition? What is
 the field definition?
 
 Two resources that'll help you greatly are:
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
 
 and the admin/analysis page...
 
 Best
 Erick
 
 On Tue, Jun 7, 2011 at 6:23 PM, Thomas Fischer fischer...@aon.at wrote:
 Hello,
 
 I am testing solr 3.2 and have problems with wildcards.
 I am indexing values like IA 300; IC 330; IA 317; IA 318 in a field GOK, 
 and can't find a way to search with wildcards.
 I want to use a wild card search to match something like IA 31? but cannot 
 find a way to do so.
 GOK:IA\ 38* doesn't work with the contents of GOK indexed as text.
 Is there a way to index and search that would meet my requirements?
 
 Thomas
 
 
 

Mit freundlichen Grüßen
Thomas Fischer




Re: wildcard search

2011-06-08 Thread Thomas Fischer
Hi Ludovic,


 I don't use it myself  (but I will soon), so I may be wrong, but did you try
 to use the ComplexPhraseQueryParser :
 
 ComplexPhraseQueryParser
  QueryParser which permits complex phrase query syntax eg (john
 jon jonathan~) peters*.
 
 It seems that you could do such type of queries :
 
 GOK:IA 38*

yes that sounds interesting.
But I don't know how to get and install it into solr. Cam you give me a hint?

Thanks
Thomas

wildcard search

2011-06-07 Thread Thomas Fischer
Hello,

I am testing solr 3.2 and have problems with wildcards.
I am indexing values like IA 300; IC 330; IA 317; IA 318 in a field GOK, 
and can't find a way to search with wildcards.
I want to use a wild card search to match something like IA 31? but cannot 
find a way to do so.
GOK:IA\ 38* doesn't work with the contents of GOK indexed as text.
Is there a way to index and search that would meet my requirements?

Thomas