Re: Questions developing custom functionquery

2013-10-10 Thread Mikhail Khludnev
Hello JT,

what's is the field and fieldType definition for "resname" ?
can't you check how '/some
example/data/here/2013/09/12/
testing.text
' is handled on analysis page in SolrAdmin?


On Fri, Oct 11, 2013 at 4:53 AM, Richard Lee  wrote:

> seems what u got is the terms other than the raw data. maybe u should check
> the api docs for more details
> 2013-10-11 上午3:56于 "JT" 写道:
>
> > I'm running into some issues developing a custom functionquery.
> >
> > My goal is to be able to implement a custom sorting technique.
> >
> > I have a field defined called resname, it is a single value str.
> >
> > Example: /some
> > example/data/here/2013/09/12/testing.text
> >
> > I would like to do a custom sort based on this resname field.
> > Basically, I would like to parse out that date there (2013/09/12) and
> sort
> > on that date.
> >
> >
> > I've followed various tutorials
> >- http://java.dzone.com/news/how-write-custom-solr
> >-
> >
> http://www.supermind.org/blog/756/how-to-write-a-custom-solr-functionquery
> >
> >
> > Im at the point where my code compiles, runs, executes, etc. Solr is
> happy
> > with my code.
> >
> > I have classes that inherit from ValueSorceParser and ValueSorce, etc.
> I've
> > overrode parse and
> > instantiated my class with ValueSource
> >
> > public ValueSource parse(FunctionQParser fqp) {
> > return MyCustomClass(fqp.parseValueSource)
> > }
> >
> > public class MyCustomClass extends ValueSource {
> > ValueSource source;
> >
> > public MyCustomClass(ValueSource source) {
> > this.source = source;
> > }
> >
> > public FunctionValues getValues() {
> >final FunctionValues sourceDV =
> > source.getvalues(context,readerContext)
> >return new IntValues(this)
> > public int intVal(int doc) {
> > //parse the value of "resname" here
> >   String value = sourceDV.strVal(doc);
> >  ...more stuff
> >  }
> >}
> >}
> >
> > The issue I'm running into is that my call to sourceDV.strVal(doc) only
> > returns "part" of the field, not all of it. It appears to be very random.
> >
> > I guess my actual question is, how do I access / reference the EXACT RAW
> > value of a field, while writing a functionquery.
> >
> > Do I need to change my ValueSource to a String?, then somehow lookup the
> > field name while inside my getValues call?
> >
> > Is there a way to access the raw field data , when referencing it as a
> > FunctionValues?
> >
> >
> > Maybe I'm going about this totally incorrectly?
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics


 


Re: SolrCore 'collection1' is not available due to init failure

2013-10-10 Thread Liu Bo
org.apache.solr.core.SolrCore.(SolrCore.java:821) ... 13 more Caused
by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed
out:
NativeFSLock@/usr/share/solr-4.5.0/example/solr/
collection1/data/index/write.lock:
java.io.FileNotFoundException:
/usr/share/solr-4.5.0/example/solr/collection1/data/index/write.lock
(Permission denied) at org.apache.lucene.store.Lock.obtain(Lock.java:84) at

it seems a permission problem, the user that start tomcat don't have
permission to access your index folder.

try grant read and write permission to current user to your solr data
folder and restart tomcat to see what happens.


-- 
All the best

Liu Bo


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Bill Bell
Does this work ?
I can suggest -XX:-UseLoopPredicate to switch off predicates.

???

Which version of 7 is recommended ?

Bill Bell
Sent from mobile


> On Oct 10, 2013, at 11:29 AM, "Smiley, David W."  wrote:
> 
> *Don't* use JDK 7u40, it's been known to cause index corruption and
> SIGSEGV faults with Lucene: LUCENE-5212   This has not been unnoticed by
> Oracle.
> 
> ~ David
> 
>> On 10/10/13 12:34 PM, "Guido Medina"  wrote:
>> 
>> 2. Java version: There are huges performance winning between Java 5, 6
>>   and 7; we use Oracle JDK 7u40.
> 


SolrCore 'collection1' is not available due to init failure

2013-10-10 Thread Jim_Armstrong
noob trying to get solr rolling. localhost_8080_/solr returns a 500.
I've been googling this msg. Thinking I don't have the solr home defined. 
Need a hint. 
Using this link as a guide.
http://www.thegeekstuff.com/2013/04/install-apache-solr-tomcat/

Debian7, Oracle Java 1.7_25, Tomcat 7.42, Solr-4.5.0

Snip of the tomcat startup script: 

JAVA_HOME="/usr/lib/jvm/java-7-oracle"
JAVA_OPTS="-Xms128M -Xmx128M";
TOMCAT_USER=tomcat;
TOMCAT_PATH=/usr/share/tomcat;
SHUTDOWN_TIME=30
## Tomcat start/stop script ##

export JAVA_HOME
export JAVA_OPTS


type Status report

message {msg=SolrCore 'collection1' is not available due to init failure:
Error opening new searcher,trace=org.apache.solr.common.SolrException:
SolrCore 'collection1' is not available due to init failure: Error opening
new searcher at
org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:785) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:295)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724) Caused by:
org.apache.solr.common.SolrException: Error opening new searcher at
org.apache.solr.core.SolrCore.(SolrCore.java:834) at
org.apache.solr.core.SolrCore.(SolrCore.java:625) at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:524)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:559) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:241) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at
java.util.concurrent.FutureTask.run(FutureTask.java:166) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at
java.util.concurrent.FutureTask.run(FutureTask.java:166) ... 3 more Caused
by: org.apache.solr.common.SolrException: Error opening new searcher at
org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1477) at
org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1589) at
org.apache.solr.core.SolrCore.(SolrCore.java:821) ... 13 more Caused
by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed
out:
NativeFSLock@/usr/share/solr-4.5.0/example/solr/collection1/data/index/write.lock:
java.io.FileNotFoundException:
/usr/share/solr-4.5.0/example/solr/collection1/data/index/write.lock
(Permission denied) at org.apache.lucene.store.Lock.obtain(Lock.java:84) at
org.apache.lucene.index.IndexWriter.(IndexWriter.java:673) at
org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:77) at
org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64) at
org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:267)
at
org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:110)
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1440) ... 15
more Caused by: java.io.FileNotFoundException:
/usr/share/solr-4.5.0/example/solr/collection1/data/index/write.lock
(Permission denied) at java.io.RandomAccessFile.open(Native Method) at
java.io.RandomAccessFile.(RandomAccessFile.java:233) at
org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:203) at
org.apache.lucene.store.Lock.obtain(Lock.java:95) ... 21 more ,code=500}

description The server encountered an internal error that prevented it from
fulfilling this request.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCore-collection1-is-not-available-due-to-init-failure-tp4094869.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Find documents that are composed of % words

2013-10-10 Thread shahzad73
is there a way that i build a plugin  that gets all words on a single page
and build a percentage to see how many words are foreign on the page  (words
not on the search list)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094867.html
Sent from the Solr - User mailing list archive at Nabble.com.


Question about plug-in update handler failure

2013-10-10 Thread Jack Park
I have an "interceptor" which grabs SolrDocument instances in the
update handler chain. It feeds those documents as a JSON string out to
an agent system.

That system has been running fine all the way up to Solr 4.3.1
I have discovered that, as of 4.4 and now 4.5, the very same config
files, agent jar, and test harness shows that no documents are
intercepted, even though the index is built.

I am wondering if I missed something in changes to Solr beyond 4.3.1
which would invalidate my setup.

For the record, earlier trials opened the war and dropped my agent jar
into WEB-INF/lib; most recent trials on all systems leaves the war
intact and drops the agent jar into collection1/lib -- it still works
on 4.3.1, but nothing beyond that.

Many thanks in advance for any thoughts.

Jack


Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread xinwu
Thank you,Shawn.

Thank you,everyone.

All your answers help me a lot.Thanks.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094850.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Yonik Seeley
Perhaps try adding echoParams=all
to check that all of the input params are being parsed as expected.

-Yonik

On Thu, Oct 10, 2013 at 8:10 PM, Utkarsh Sengar  wrote:
> Didn't help.
>
> This is the complete data: https://gist.github.com/utkarsh2012/6927649 (see
> merchantList column).
> I tried this URL:
> curl '
> http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=\&stream.contentType=text/csv&stream.file=/data/dump/log_20130101
> '
>
> Can this be a bug in the UpdateCSV split function?
>
> Thanks,
> -Utkarsh
>
>
>
> On Thu, Oct 10, 2013 at 3:11 PM, Jack Krupansky 
> wrote:
>
>> Using the standard Solr example for Solr 4.5, the following works,
>> splitting the features CSV field into multiple values:
>>
>> curl "http://localhost:8983/solr/**update/csv?commit=true&f.**
>> features.split=true&f.**features.separator=%3A&f.**
>> features.encapsulator=%22"
>> -H "Content-Type: text/csv" -d '
>> id,name,features
>> doc-1,doc1,feat1:feat2'
>>
>> You may need to add &stream.contentType=text/csv to you command.
>>
>> -- Jack Krupansky
>>
>> -Original Message- From: Utkarsh Sengar
>> Sent: Thursday, October 10, 2013 4:51 PM
>> To: solr-user@lucene.apache.org
>> Subject: Using split in updateCSV for SolrCloud 4.4
>>
>>
>> Hello,
>>
>> I am trying to use split: 
>> http://wiki.apache.org/solr/**UpdateCSV#splitwhile
>> loading some csv data via updateCSV.
>>
>> This is the field:
>> > multiValued="true" omitNorms="true" termVectors="false"
>> termPositions="false" termOffsets="false"/>
>>
>> This is the column in CSV (merchantList):
>> values,"16179:10950",.**values..
>>
>>
>> This is the URL I call:
>> http://localhost/solr/coll1/**update/csv?commit=true&f.**
>> merchantList.split=true&f.**merchantList.separator=%3A&f.**
>> merchantList.encapsulator=
>> "&escape=\&stream.file=/data/**dump/log_20130101'
>>
>> Currently when I load the data, I see this:
>>"merchantList": ["16179:10950"],
>> But I want this:
>>"merchantList": ["16179","10950"],
>>
>>
>> This example is int but I have intentionally kept it as a string since some
>> values can also be a string.
>>
>> Any suggestions where I am going wrong?
>>
>> --
>> Thanks,
>> -Utkarsh
>>
>
>
>
> --
> Thanks,
> -Utkarsh


Re: Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Jack Krupansky
Yeah, I notiiced that too and tried that as well, and tried it in 4.4 as 
well, and tried a raw URL in the Chrome browser as well, and it all works 
fine.


Did you try my example with the standard Solr example schema?

I'm trying to see what's different from your example and mine, other than 
the field name.


My latest test case was with this URL in Chrome:

http://localhost:8983/solr/update/csv?commit=true&f.features_ss.split=true&f.features_ss.separator=%3A&f.features_ss.encapsulator=%22&stream.contentType=text/csv&stream.file=test.csv

With this content for test.csv:

id,name,features_ss,junk_s
doc-1,doc1,"feat1:feat2",junk

Can you confirm whether this exact case works for you?

-- Jack Krupansky

-Original Message- 
From: Utkarsh Sengar

Sent: Thursday, October 10, 2013 8:48 PM
To: solr-user@lucene.apache.org
Subject: Re: Using split in updateCSV for SolrCloud 4.4

@Jack I just noticed in your example that: feat1:feat2 is not in an
encapsulator ".
Was that a typo or intentional?

You are passing f.features.encapsulator=%22 but don't have " around
feat1:feat2. The request should look:

curl "
http://localhost:8983/solr/update/csv?commit=true&f.features.split=true&f.features.separator=%3A&f.features.encapsulator=%22";
-H "Content-Type: text/csv" -d '
id,name,features
doc-1,doc1,"feat1:feat2"'


Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 5:10 PM, Utkarsh Sengar 
wrote:



Didn't help.

This is the complete data: https://gist.github.com/utkarsh2012/6927649(see 
merchantList column).

I tried this URL:
curl '
http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=\&stream.contentType=text/csv&stream.file=/data/dump/log_20130101
'

Can this be a bug in the UpdateCSV split function?

Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 3:11 PM, Jack Krupansky 
wrote:



Using the standard Solr example for Solr 4.5, the following works,
splitting the features CSV field into multiple values:

curl "http://localhost:8983/solr/**update/csv?commit=true&f.**
features.split=true&f.**features.separator=%3A&f.**
features.encapsulator=%22"
-H "Content-Type: text/csv" -d '
id,name,features
doc-1,doc1,feat1:feat2'

You may need to add &stream.contentType=text/csv to you command.

-- Jack Krupansky

-Original Message- From: Utkarsh Sengar
Sent: Thursday, October 10, 2013 4:51 PM
To: solr-user@lucene.apache.org
Subject: Using split in updateCSV for SolrCloud 4.4


Hello,

I am trying to use split: 
http://wiki.apache.org/solr/**UpdateCSV#splitwhile

loading some csv data via updateCSV.

This is the field:


This is the column in CSV (merchantList):
values,"16179:10950",.**values..


This is the URL I call:
http://localhost/solr/coll1/**update/csv?commit=true&f.**
merchantList.split=true&f.**merchantList.separator=%3A&f.**
merchantList.encapsulator=
"&escape=\&stream.file=/data/**dump/log_20130101'

Currently when I load the data, I see this:
   "merchantList": ["16179:10950"],
But I want this:
   "merchantList": ["16179","10950"],


This example is int but I have intentionally kept it as a string since
some
values can also be a string.

Any suggestions where I am going wrong?

--
Thanks,
-Utkarsh





--
Thanks,
-Utkarsh





--
Thanks,
-Utkarsh 



Re: Questions developing custom functionquery

2013-10-10 Thread Richard Lee
seems what u got is the terms other than the raw data. maybe u should check
the api docs for more details
2013-10-11 上午3:56于 "JT" 写道:

> I'm running into some issues developing a custom functionquery.
>
> My goal is to be able to implement a custom sorting technique.
>
> I have a field defined called resname, it is a single value str.
>
> Example: /some
> example/data/here/2013/09/12/testing.text
>
> I would like to do a custom sort based on this resname field.
> Basically, I would like to parse out that date there (2013/09/12) and sort
> on that date.
>
>
> I've followed various tutorials
>- http://java.dzone.com/news/how-write-custom-solr
>-
> http://www.supermind.org/blog/756/how-to-write-a-custom-solr-functionquery
>
>
> Im at the point where my code compiles, runs, executes, etc. Solr is happy
> with my code.
>
> I have classes that inherit from ValueSorceParser and ValueSorce, etc. I've
> overrode parse and
> instantiated my class with ValueSource
>
> public ValueSource parse(FunctionQParser fqp) {
> return MyCustomClass(fqp.parseValueSource)
> }
>
> public class MyCustomClass extends ValueSource {
> ValueSource source;
>
> public MyCustomClass(ValueSource source) {
> this.source = source;
> }
>
> public FunctionValues getValues() {
>final FunctionValues sourceDV =
> source.getvalues(context,readerContext)
>return new IntValues(this)
> public int intVal(int doc) {
> //parse the value of "resname" here
>   String value = sourceDV.strVal(doc);
>  ...more stuff
>  }
>}
>}
>
> The issue I'm running into is that my call to sourceDV.strVal(doc) only
> returns "part" of the field, not all of it. It appears to be very random.
>
> I guess my actual question is, how do I access / reference the EXACT RAW
> value of a field, while writing a functionquery.
>
> Do I need to change my ValueSource to a String?, then somehow lookup the
> field name while inside my getValues call?
>
> Is there a way to access the raw field data , when referencing it as a
> FunctionValues?
>
>
> Maybe I'm going about this totally incorrectly?
>


Re: Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Utkarsh Sengar
@Jack I just noticed in your example that: feat1:feat2 is not in an
encapsulator ".
Was that a typo or intentional?

You are passing f.features.encapsulator=%22 but don't have " around
feat1:feat2. The request should look:

curl "
http://localhost:8983/solr/update/csv?commit=true&f.features.split=true&f.features.separator=%3A&f.features.encapsulator=%22";
-H "Content-Type: text/csv" -d '
id,name,features
doc-1,doc1,"feat1:feat2"'


Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 5:10 PM, Utkarsh Sengar wrote:

> Didn't help.
>
> This is the complete data: https://gist.github.com/utkarsh2012/6927649(see 
> merchantList column).
> I tried this URL:
> curl '
> http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=\&stream.contentType=text/csv&stream.file=/data/dump/log_20130101
> '
>
> Can this be a bug in the UpdateCSV split function?
>
> Thanks,
> -Utkarsh
>
>
>
> On Thu, Oct 10, 2013 at 3:11 PM, Jack Krupansky 
> wrote:
>
>> Using the standard Solr example for Solr 4.5, the following works,
>> splitting the features CSV field into multiple values:
>>
>> curl "http://localhost:8983/solr/**update/csv?commit=true&f.**
>> features.split=true&f.**features.separator=%3A&f.**
>> features.encapsulator=%22"
>> -H "Content-Type: text/csv" -d '
>> id,name,features
>> doc-1,doc1,feat1:feat2'
>>
>> You may need to add &stream.contentType=text/csv to you command.
>>
>> -- Jack Krupansky
>>
>> -Original Message- From: Utkarsh Sengar
>> Sent: Thursday, October 10, 2013 4:51 PM
>> To: solr-user@lucene.apache.org
>> Subject: Using split in updateCSV for SolrCloud 4.4
>>
>>
>> Hello,
>>
>> I am trying to use split: 
>> http://wiki.apache.org/solr/**UpdateCSV#splitwhile
>> loading some csv data via updateCSV.
>>
>> This is the field:
>> > multiValued="true" omitNorms="true" termVectors="false"
>> termPositions="false" termOffsets="false"/>
>>
>> This is the column in CSV (merchantList):
>> values,"16179:10950",.**values..
>>
>>
>> This is the URL I call:
>> http://localhost/solr/coll1/**update/csv?commit=true&f.**
>> merchantList.split=true&f.**merchantList.separator=%3A&f.**
>> merchantList.encapsulator=
>> "&escape=\&stream.file=/data/**dump/log_20130101'
>>
>> Currently when I load the data, I see this:
>>"merchantList": ["16179:10950"],
>> But I want this:
>>"merchantList": ["16179","10950"],
>>
>>
>> This example is int but I have intentionally kept it as a string since
>> some
>> values can also be a string.
>>
>> Any suggestions where I am going wrong?
>>
>> --
>> Thanks,
>> -Utkarsh
>>
>
>
>
> --
> Thanks,
> -Utkarsh
>



-- 
Thanks,
-Utkarsh


Re: Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Utkarsh Sengar
Didn't help.

This is the complete data: https://gist.github.com/utkarsh2012/6927649 (see
merchantList column).
I tried this URL:
curl '
http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=\&stream.contentType=text/csv&stream.file=/data/dump/log_20130101
'

Can this be a bug in the UpdateCSV split function?

Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 3:11 PM, Jack Krupansky wrote:

> Using the standard Solr example for Solr 4.5, the following works,
> splitting the features CSV field into multiple values:
>
> curl "http://localhost:8983/solr/**update/csv?commit=true&f.**
> features.split=true&f.**features.separator=%3A&f.**
> features.encapsulator=%22"
> -H "Content-Type: text/csv" -d '
> id,name,features
> doc-1,doc1,feat1:feat2'
>
> You may need to add &stream.contentType=text/csv to you command.
>
> -- Jack Krupansky
>
> -Original Message- From: Utkarsh Sengar
> Sent: Thursday, October 10, 2013 4:51 PM
> To: solr-user@lucene.apache.org
> Subject: Using split in updateCSV for SolrCloud 4.4
>
>
> Hello,
>
> I am trying to use split: 
> http://wiki.apache.org/solr/**UpdateCSV#splitwhile
> loading some csv data via updateCSV.
>
> This is the field:
>  multiValued="true" omitNorms="true" termVectors="false"
> termPositions="false" termOffsets="false"/>
>
> This is the column in CSV (merchantList):
> values,"16179:10950",.**values..
>
>
> This is the URL I call:
> http://localhost/solr/coll1/**update/csv?commit=true&f.**
> merchantList.split=true&f.**merchantList.separator=%3A&f.**
> merchantList.encapsulator=
> "&escape=\&stream.file=/data/**dump/log_20130101'
>
> Currently when I load the data, I see this:
>"merchantList": ["16179:10950"],
> But I want this:
>"merchantList": ["16179","10950"],
>
>
> This example is int but I have intentionally kept it as a string since some
> values can also be a string.
>
> Any suggestions where I am going wrong?
>
> --
> Thanks,
> -Utkarsh
>



-- 
Thanks,
-Utkarsh


Re: Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Jack Krupansky
Using the standard Solr example for Solr 4.5, the following works, splitting 
the features CSV field into multiple values:


curl 
"http://localhost:8983/solr/update/csv?commit=true&f.features.split=true&f.features.separator=%3A&f.features.encapsulator=%22"; 
-H "Content-Type: text/csv" -d '

id,name,features
doc-1,doc1,feat1:feat2'

You may need to add &stream.contentType=text/csv to you command.

-- Jack Krupansky

-Original Message- 
From: Utkarsh Sengar

Sent: Thursday, October 10, 2013 4:51 PM
To: solr-user@lucene.apache.org
Subject: Using split in updateCSV for SolrCloud 4.4

Hello,

I am trying to use split: http://wiki.apache.org/solr/UpdateCSV#split while
loading some csv data via updateCSV.

This is the field:


This is the column in CSV (merchantList):
values,"16179:10950",.values..


This is the URL I call:
http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=
"&escape=\&stream.file=/data/dump/log_20130101'

Currently when I load the data, I see this:
   "merchantList": ["16179:10950"],
But I want this:
   "merchantList": ["16179","10950"],


This example is int but I have intentionally kept it as a string since some
values can also be a string.

Any suggestions where I am going wrong?

--
Thanks,
-Utkarsh 



Re: Find documents that are composed of % words

2013-10-10 Thread Jack Krupansky
Or if they simply copied the requirement from some other search engine or 
text analytics package, get the name of that other software and supply us 
with a URL pointing to the description of that feature. Ditto if the feature 
was described in an academic paper.


Solr does have a lot of text analytics features, but is still somewhat light 
in that area.


It does sound as if you are seeking to match two "documents" as opposed to 
matching a "query" against documents.


-- Jack Krupansky

-Original Message- 
From: shahzad73

Sent: Thursday, October 10, 2013 3:03 PM
To: solr-user@lucene.apache.org
Subject: Re: Find documents that are composed of % words

Yes the correct is answer may be "Why" but you cannot ask this to 
client.

He think there is something interesting with this formula and if it works we
can index websites with  Nutch + Solrand let users input queries that
can locate documents which has % of foreign words other than list provided.
i will check the answer provided

Shahzad



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094778.html
Sent from the Solr - User mailing list archive at Nabble.com. 



Using split in updateCSV for SolrCloud 4.4

2013-10-10 Thread Utkarsh Sengar
Hello,

I am trying to use split: http://wiki.apache.org/solr/UpdateCSV#split while
loading some csv data via updateCSV.

This is the field:


This is the column in CSV (merchantList):
values,"16179:10950",.values..


This is the URL I call:
http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=
"&escape=\&stream.file=/data/dump/log_20130101'

Currently when I load the data, I see this:
"merchantList": ["16179:10950"],
But I want this:
"merchantList": ["16179","10950"],


This example is int but I have intentionally kept it as a string since some
values can also be a string.

Any suggestions where I am going wrong?

-- 
Thanks,
-Utkarsh


Questions developing custom functionquery

2013-10-10 Thread JT
I'm running into some issues developing a custom functionquery.

My goal is to be able to implement a custom sorting technique.

I have a field defined called resname, it is a single value str.

Example: /some
example/data/here/2013/09/12/testing.text

I would like to do a custom sort based on this resname field.
Basically, I would like to parse out that date there (2013/09/12) and sort
on that date.


I've followed various tutorials
   - http://java.dzone.com/news/how-write-custom-solr
   -
http://www.supermind.org/blog/756/how-to-write-a-custom-solr-functionquery


Im at the point where my code compiles, runs, executes, etc. Solr is happy
with my code.

I have classes that inherit from ValueSorceParser and ValueSorce, etc. I've
overrode parse and
instantiated my class with ValueSource

public ValueSource parse(FunctionQParser fqp) {
return MyCustomClass(fqp.parseValueSource)
}

public class MyCustomClass extends ValueSource {
ValueSource source;

public MyCustomClass(ValueSource source) {
this.source = source;
}

public FunctionValues getValues() {
   final FunctionValues sourceDV =
source.getvalues(context,readerContext)
   return new IntValues(this)
public int intVal(int doc) {
//parse the value of "resname" here
  String value = sourceDV.strVal(doc);
 ...more stuff
 }
   }
   }

The issue I'm running into is that my call to sourceDV.strVal(doc) only
returns "part" of the field, not all of it. It appears to be very random.

I guess my actual question is, how do I access / reference the EXACT RAW
value of a field, while writing a functionquery.

Do I need to change my ValueSource to a String?, then somehow lookup the
field name while inside my getValues call?

Is there a way to access the raw field data , when referencing it as a
FunctionValues?


Maybe I'm going about this totally incorrectly?


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
Hmm, thanks for sharing this, according to the JIRA comments it seems to 
affect only 32 bits systems?


https://issues.apache.org/jira/browse/LUCENE-5212

Guido.

On 10/10/13 18:29, Smiley, David W. wrote:

*Don't* use JDK 7u40, it's been known to cause index corruption and
SIGSEGV faults with Lucene: LUCENE-5212   This has not been unnoticed by
Oracle.

~ David

On 10/10/13 12:34 PM, "Guido Medina"  wrote:


2. Java version: There are huges performance winning between Java 5, 6
and 7; we use Oracle JDK 7u40.




Re: Find documents that are composed of % words

2013-10-10 Thread shahzad73
Yes the correct is answer may be "Why" but you cannot ask this to client.  
He think there is something interesting with this formula and if it works we
can index websites with  Nutch + Solrand let users input queries that
can locate documents which has % of foreign words other than list provided.   
i will check the answer provided

Shahzad



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094778.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: which jar contains org.apache.solr.request.XSLTResponseWriter ?

2013-10-10 Thread Shawn Heisey

On 10/10/2013 12:18 PM, MC wrote:
Shawn thank you for your help. I had another look at my settings, and 
although classpath and code were OK, I found this entry in 
solrconfig.xml:
class="org.apache.solr.request.XSLTResponseWriter">


That was the problem. So you were right, it was a relic of the old 
version. My code started working after I changed it to this:
class="org.apache.solr.response.XSLTResponseWriter">


Awesome!  I'm glad it was something easily solved.

Thanks,
Shawn



Re: which jar contains org.apache.solr.request.XSLTResponseWriter ?

2013-10-10 Thread MC
Shawn thank you for your help. I had another look at my settings, and 
although classpath and code were OK, I found this entry in solrconfig.xml:
class="org.apache.solr.request.XSLTResponseWriter">


That was the problem. So you were right, it was a relic of the old 
version. My code started working after I changed it to this:
class="org.apache.solr.response.XSLTResponseWriter">


Thanks a lot,

M


On 10/10/13 1:50 PM, Shawn Heisey wrote:

On 10/10/2013 10:15 AM, MC wrote:

My embedded solr server (4.4.0) is crashing when I submit a query.
The reason is this:
Caused by: java.lang.ClassNotFoundException: 
org.apache.solr.request.XSLTResponseWriter


I have the following jars in my classpath:
solr-core-4.4.0.jar
solr-solrj-4.4.0.jar
solr-dataimporthandler-4.4.0.jar
solr-dataimporthandler-extras-4.4.0.jar

I checked contents of the solr-core jar, there is a file called 
XSLTResponseWriter in it, but it's in org.apache.solr.response 
package, not in org.apache.solr.request package.


In Solr 3.x, that class is in the org.apache.solr.request package.  
Looks like it got moved in 4.x.  This seems to indicate one of two 
things are in your classpath:


1) Solr or SolrJ 3.x jars
2) Something else designed for use (and compiled) with Solr/SolrJ 
version 3.x.


I'm guessing that the source of the problem is your application . 
Chances are that it was written and compiled against Solr/SolrJ 3.x, 
but you're trying to use it with version 4.4.0 without modifying or 
recompiling it.


That kind of major version jump just isn't possible.  A minor version 
jump is likely to work, but I wouldn't even be too sure about that.  
If this is what's happening, the application source code will need to 
be updated for the new version and it will need to be recompiled 
against the 4.4.0 jars.


Thanks,
Shawn






Re: which jar contains org.apache.solr.request.XSLTResponseWriter ?

2013-10-10 Thread Shawn Heisey

On 10/10/2013 10:15 AM, MC wrote:

My embedded solr server (4.4.0) is crashing when I submit a query.
The reason is this:
Caused by: java.lang.ClassNotFoundException: 
org.apache.solr.request.XSLTResponseWriter


I have the following jars in my classpath:
solr-core-4.4.0.jar
solr-solrj-4.4.0.jar
solr-dataimporthandler-4.4.0.jar
solr-dataimporthandler-extras-4.4.0.jar

I checked contents of the solr-core jar, there is a file called 
XSLTResponseWriter in it, but it's in org.apache.solr.response 
package, not in org.apache.solr.request package.


In Solr 3.x, that class is in the org.apache.solr.request package.  
Looks like it got moved in 4.x.  This seems to indicate one of two 
things are in your classpath:


1) Solr or SolrJ 3.x jars
2) Something else designed for use (and compiled) with Solr/SolrJ 
version 3.x.


I'm guessing that the source of the problem is your application .  
Chances are that it was written and compiled against Solr/SolrJ 3.x, but 
you're trying to use it with version 4.4.0 without modifying or 
recompiling it.


That kind of major version jump just isn't possible.  A minor version 
jump is likely to work, but I wouldn't even be too sure about that.  If 
this is what's happening, the application source code will need to be 
updated for the new version and it will need to be recompiled against 
the 4.4.0 jars.


Thanks,
Shawn



Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Smiley, David W.
*Don't* use JDK 7u40, it's been known to cause index corruption and
SIGSEGV faults with Lucene: LUCENE-5212   This has not been unnoticed by
Oracle.

~ David

On 10/10/13 12:34 PM, "Guido Medina"  wrote:

>2. Java version: There are huges performance winning between Java 5, 6
>and 7; we use Oracle JDK 7u40.



Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
Even if you use a newer jetty, you won't see any difference, what you 
should care:


1. Jetty using NIO which is enabled by default on Jetty coming from
   Ubuntu repo (I think)
2. Java version: There are huges performance winning between Java 5, 6
   and 7; we use Oracle JDK 7u40.
3. JVM options for GC, -server flag, etc, the JAVA_OPTIONS I sent
   before are the ones we are using on production.
4. Solrconfig.xml: Things like caches (initial size, size, etc),
   softcommit, autocommit, but that's the next step I guess.

Guido.

On 10/10/13 17:27, Guido Medina wrote:
Why not just go straight for 4.5.0? Also, we have it running with JDK 
7, we use Oracle's JVM sym-linked to /opt/java, that would be an extra 
step (modifying the JAVA_HOME at /etc/defaul/jetty), it it worthy doing.


Glad I helped, cheers,

Guido.

On 10/10/13 16:57, Peter Schmidt wrote:

SOLVED: I reinstalled the jetty package, because i wanted to get a clean
installation. And now it's working with your hint Guido :-) Thank you 
very

much.

What i did:

# Download Solr
wget http://archive.apache.org/dist/lucene/solr/4.4.0/solr-4.4.0.tgz
tar xvfz solr-4.4.0.tgz

# Extract content from solr.war and add missing jars from the lib/ext 
like

Guido described
mkdir dir_to_extract
cp -R solr-4.4.0/example/webapps/solr.war dir_to_extract
cd dir_to_extract
unzip solr.war
rm solr.war
cp ../solr-4.4.0/example/lib/ext/*.jar WEB-INF/lib/
jar -cvf solr.war *

# copy new var to jetty webapps folder
sudo cp solr.war /usr/share/jetty/webapps

# Copy Solr example files
sudo mkdir /usr/share/solr
sudo cp -R solr-4.4.0/example/* /usr/share/solr/
sudo chmod -R jetty:adm /usr/share/solr

# Edit jetty config
vi /etc/default/jetty

NO_START=0
VERBOSE=yes
JETTY_HOST=0.0.0.0
JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true
-Dsolr.solr.home=/usr/share/solr/solr $JAVA_OPTIONS"

And then Solr 4.4.0 is accessible on http://localhost:8080/solr

But i also saw the box with the hint on
https://cwiki.apache.org/confluence/display/solr/Installing+Solr:

"Solr ships with a working Jetty server, with optimized settings for 
Solr,
inside the example directory. It is recommended that you use the 
provided

Jetty server for optimal performance. If you absolutely must use a
different servlet container then continue to the next section on how to
install Solr."

@Guido: Do you know if the performance is weaker with the Jetty 6.1?

And which Jetty version is the inluded one?



2013/10/10 Peter Schmidt 


i added the jars you have listet and recreated a solr.war


2013/10/10 Peter Schmidt 

OK. I extracted the solr.war in webapps folder. And than out.log 
reports


2013-10-10 16:47:28.184:WARN::Config error at |name="jetty.home" 
default="."/>/logs/_mm_dd.stderrout.log
type="boolean">false90GMT| 
java.lang.reflect.InvocationTargetException
2013-10-10 16:47:28.191:WARN::EXCEPTION
java.lang.reflect.InvocationTargetException

 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native

Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 


 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 

 at 
java.lang.reflect.Constructor.newInstance(Constructor.java:532)

 at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
 at
org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
 at
org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
 at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
 at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
 at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
 at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)

 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 


 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 


 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.mortbay.start.Main.invokeMain(Main.java:194)
 at org.mortbay.start.Main.start(Main.java:534)
 at
org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)

 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 


 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 


 at java.lang.reflect.Method.invoke(Method.java:616)
 at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177) 


2013-10-10 16:47:28.192:WARN::Nested in
java.lang.reflect.InvocationTargetException:
java.io.IOException: Cannot write log file
/var/log/jetty/2013_10_10.stderrout.log
 at
org.mortbay.util.Rol

Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
Why not just go straight for 4.5.0? Also, we have it running with JDK 7, 
we use Oracle's JVM sym-linked to /opt/java, that would be an extra step 
(modifying the JAVA_HOME at /etc/defaul/jetty), it it worthy doing.


Glad I helped, cheers,

Guido.

On 10/10/13 16:57, Peter Schmidt wrote:

SOLVED: I reinstalled the jetty package, because i wanted to get a clean
installation. And now it's working with your hint Guido :-) Thank you very
much.

What i did:

# Download Solr
wget http://archive.apache.org/dist/lucene/solr/4.4.0/solr-4.4.0.tgz
tar xvfz solr-4.4.0.tgz

# Extract content from solr.war and add missing jars from the lib/ext like
Guido described
mkdir dir_to_extract
cp -R solr-4.4.0/example/webapps/solr.war dir_to_extract
cd dir_to_extract
unzip solr.war
rm solr.war
cp ../solr-4.4.0/example/lib/ext/*.jar WEB-INF/lib/
jar -cvf solr.war *

# copy new var to jetty webapps folder
sudo cp solr.war /usr/share/jetty/webapps

# Copy Solr example files
sudo mkdir /usr/share/solr
sudo cp -R solr-4.4.0/example/* /usr/share/solr/
sudo chmod -R jetty:adm /usr/share/solr

# Edit jetty config
vi /etc/default/jetty

NO_START=0
VERBOSE=yes
JETTY_HOST=0.0.0.0
JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true
-Dsolr.solr.home=/usr/share/solr/solr $JAVA_OPTIONS"

And then Solr 4.4.0 is accessible on http://localhost:8080/solr

But i also saw the box with the hint on
https://cwiki.apache.org/confluence/display/solr/Installing+Solr:

"Solr ships with a working Jetty server, with optimized settings for Solr,
inside the example directory. It is recommended that you use the provided
Jetty server for optimal performance. If you absolutely must use a
different servlet container then continue to the next section on how to
install Solr."

@Guido: Do you know if the performance is weaker with the Jetty 6.1?

And which Jetty version is the inluded one?



2013/10/10 Peter Schmidt 


i added the jars you have listet and recreated a solr.war


2013/10/10 Peter Schmidt 


OK. I extracted the solr.war in webapps folder. And than out.log reports

2013-10-10 16:47:28.184:WARN::Config error at |/logs/_mm_dd.stderrout.logfalse90GMT|  
java.lang.reflect.InvocationTargetException
2013-10-10 16:47:28.191:WARN::EXCEPTION
java.lang.reflect.InvocationTargetException

 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
 at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
 at
org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
 at
org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
 at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
 at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
 at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
 at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.mortbay.start.Main.invokeMain(Main.java:194)
 at org.mortbay.start.Main.start(Main.java:534)
 at
org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
2013-10-10 16:47:28.192:WARN::Nested in
java.lang.reflect.InvocationTargetException:
java.io.IOException: Cannot write log file
/var/log/jetty/2013_10_10.stderrout.log
 at
org.mortbay.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:233)
 at
org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:164)
 at
org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:116)

 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
 at
org.mortbay.xml.XmlC

Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread Liu Bo
you can try this way:

start zookeeper server first.

upload your configurations to zookeeper and link them to your collection
using zkcli just like shawn said

let's say you have conf1 and conf2, you can link them to collection1 and
collection2

remove the bootstrap stuff and start solr server.

after you have solr running, create collection1 and collection2 via core
admin, you don't have conf because all your core specified configurations
are in zookeeper

or you could use core discovery and have collection name specified in
core.properties, see :
http://wiki.apache.org/solr/Core%20Discovery%20%284.4%20and%20beyond%29



On 10 October 2013 23:57, maephisto  wrote:

> On this topic, once you've uploaded you collection's configuration in ZK,
> how
> can you update it?
> Upload the new one with the same config name ?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094729.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
All the best

Liu Bo


which jar contains org.apache.solr.request.XSLTResponseWriter ?

2013-10-10 Thread MC

Hello,
My embedded solr server (4.4.0) is crashing when I submit a query.
The reason is this:
Caused by: java.lang.ClassNotFoundException: 
org.apache.solr.request.XSLTResponseWriter


I have the following jars in my classpath:
solr-core-4.4.0.jar
solr-solrj-4.4.0.jar
solr-dataimporthandler-4.4.0.jar
solr-dataimporthandler-extras-4.4.0.jar

I checked contents of the solr-core jar, there is a file called 
XSLTResponseWriter in it, but it's in org.apache.solr.response package, 
not in org.apache.solr.request package.

I'm guessing there should be another jar?
Thanks,

M



Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread Upayavira
Use $solrzip/example/cloud-scripts/zkcli.sh to upload a new set of
configuration files.

Upayavira

On Thu, Oct 10, 2013, at 04:57 PM, maephisto wrote:
> On this topic, once you've uploaded you collection's configuration in ZK,
> how
> can you update it?
> Upload the new one with the same config name ?
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094729.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
SOLVED: I reinstalled the jetty package, because i wanted to get a clean
installation. And now it's working with your hint Guido :-) Thank you very
much.

What i did:

# Download Solr
wget http://archive.apache.org/dist/lucene/solr/4.4.0/solr-4.4.0.tgz
tar xvfz solr-4.4.0.tgz

# Extract content from solr.war and add missing jars from the lib/ext like
Guido described
mkdir dir_to_extract
cp -R solr-4.4.0/example/webapps/solr.war dir_to_extract
cd dir_to_extract
unzip solr.war
rm solr.war
cp ../solr-4.4.0/example/lib/ext/*.jar WEB-INF/lib/
jar -cvf solr.war *

# copy new var to jetty webapps folder
sudo cp solr.war /usr/share/jetty/webapps

# Copy Solr example files
sudo mkdir /usr/share/solr
sudo cp -R solr-4.4.0/example/* /usr/share/solr/
sudo chmod -R jetty:adm /usr/share/solr

# Edit jetty config
vi /etc/default/jetty

NO_START=0
VERBOSE=yes
JETTY_HOST=0.0.0.0
JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true
-Dsolr.solr.home=/usr/share/solr/solr $JAVA_OPTIONS"

And then Solr 4.4.0 is accessible on http://localhost:8080/solr

But i also saw the box with the hint on
https://cwiki.apache.org/confluence/display/solr/Installing+Solr:

"Solr ships with a working Jetty server, with optimized settings for Solr,
inside the example directory. It is recommended that you use the provided
Jetty server for optimal performance. If you absolutely must use a
different servlet container then continue to the next section on how to
install Solr."

@Guido: Do you know if the performance is weaker with the Jetty 6.1?

And which Jetty version is the inluded one?



2013/10/10 Peter Schmidt 

> i added the jars you have listet and recreated a solr.war
>
>
> 2013/10/10 Peter Schmidt 
>
>> OK. I extracted the solr.war in webapps folder. And than out.log reports
>>
>> 2013-10-10 16:47:28.184:WARN::Config error at > class="java.io.PrintStream">|> class="org.mortbay.util.RolloverFileOutputStream">> name="jetty.home" default="."/>/logs/_mm_dd.stderrout.log> type="boolean">false90> class="java.util.TimeZone"
>> name="getTimeZone">GMT> name="datedFilename"/>|  
>> java.lang.reflect.InvocationTargetException
>> 2013-10-10 16:47:28.191:WARN::EXCEPTION
>> java.lang.reflect.InvocationTargetException
>>
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
>> at
>> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
>> at
>> org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
>> at
>> org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
>> at
>> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
>> at
>> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
>> at
>> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
>> at
>> org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at org.mortbay.start.Main.invokeMain(Main.java:194)
>> at org.mortbay.start.Main.start(Main.java:534)
>> at
>> org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at
>> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
>> 2013-10-10 16:47:28.192:WARN::Nested in
>> java.lang.reflect.InvocationTargetException:
>> java.io.IOException: Cannot write log file
>> /var/log/jetty/2013_10_10.stderrout.log
>> at
>> org.mortbay.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:233)
>> at
>> org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:164)
>> at
>> org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:116)
>>
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.re

Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread maephisto
On this topic, once you've uploaded you collection's configuration in ZK, how
can you update it?
Upload the new one with the same config name ?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094729.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread Shawn Heisey
On 10/10/2013 2:45 AM, xinwu wrote:
> I solved that problem by using the "-Dbootstrap_conf=true" configuration
> instead of the "-Dbootstrap_confdir=/opt/Solr_home/collection1/conf
> -Dcollection.configName=solrConfig" on startup.

You do not need this bootstrap option either.  Once your configurations
are loaded into zookeeper, nothing further is needed - the information
is there.

> But,another problem showed up.
> 
> I had two collections (collection1,collection2) when I started my Solr.
> Collection1 and Collection2 had different schema.
> 
> Then I created two other collections in my project which had the same schema
> with the collection2.
> But these two new collections only had "data" directory, which means there
> was no 'conf' directory.
> 
> And when I started my solr again,some errors showed up because of the
> missing of 'conf' directory.

This is expected, because the bootstrap options (especially
bootstrap_conf) are not intended for extended use.

SolrCloud doesn't use conf directories.  All that is in zookeeper.  The
bootstrap options are one way of converting configurations from
non-SolrCloud to SolrCloud.  Once that's done, it does not need to be
done again.

The other way of converting and maintaining SolrCloud configuration
information, which in my opinion is better, is with the zkcli utility
included in example/cloud-scripts.

This is the definition that most closely describes what bootstrapping
means with respect to SolrCloud.  Solr is not a development environment,
but the general notion applies:

http://en.wikipedia.org/wiki/Bootstrapping#Software_development

Thanks,
Shawn



Re: Please help!, Highlighting exact phrases with solr

2013-10-10 Thread Koji Sekiguchi

(13/10/10 18:17), Silvia Suárez wrote:

I am using solrj as client for indexing documents on the solr server I am
new to solr, And I am having problem with the highlighting in solr.
Highlighting exact phrases with solr does not work.

For example if the search keyword is: "dulce hogar" it returns:

 dulce   hogar 

  And it should be:

 dulce hogar 

I don't understand which is the problem. Can someone  helpme please!?


Unfortunately, it is the feature.
FVH can support phrase-unit highlighting.

http://wiki.apache.org/solr/HighlightingParameters#hl.useFastVectorHighlighter

koji
--
http://soleami.com/blog/automatically-acquiring-synonym-knowledge-from-wikipedia.html


Re: Re: feedback on Solr 4.x LotsOfCores feature

2013-10-10 Thread Soyez Olivier
The corresponding patch for Solr 4.2.1 LotsOfCores can be found in SOLR-5316, 
including the new Cores options :
- "numBuckets" to create a subdirectory based on a hash on the corename % 
numBuckets in the core Datadir
- "Auto" with 3 differents values :
  1) false : default behaviour
  2) createLoad : create, if not exist, and load the core on the fly on the 
first incoming request (update, select)
  3) onlyLoad : load the core on the fly on the first incoming request (update, 
select), if exist on disk

Concerning :
- sharing the underlying solrconfig object, the configset introduced in JIRA 
SOLR-4478 seems to be the solution for non-SolrCloud mode.
We need to test it for our use case. If another solution exists, please tell 
me. We are very interested in such functionality and to contribute, if we can.

- the possibility of lotsOfCores in SolrCloud, we don't know in details how 
SolrCloud is working.
But one possible limit is the maximum number of entries that can be added to a 
zookeeper node.
Maybe, a solution will be just a kind of hashing in the zookeeper tree.

- the time to discover cores in Solr 4.4 : with spinning disk under linux, all 
cores with transient="true" and loadOnStartup="false", the linux buffer cache 
empty before starting Solr :
15K cores is around 4 minutes. It's linear in the cores number, so for 50K it's 
more than 13 minutes. In fact, it corresponding to the time to read all 
core.properties files.
To do that in background and to block on that request until core discovery is 
complete, should not work for us (due to the worst case).
So, we will just disable the core Discovery, because we don't need to know all 
cores from the start. Start Solr without any core entries in solr.xml, and we 
will use the cores Auto option to create load or only load the core on the fly, 
based on the existence of the core on the disk (absolute path calculated from 
the core name).

Thanks for your interest,

Olivier

De : Erick Erickson [erickerick...@gmail.com]
Date d'envoi : lundi 7 octobre 2013 14:33
À : solr-user@lucene.apache.org
Objet : Re: feedback on Solr 4.x LotsOfCores feature

Thanks for the great writeup! It's always interesting to see how
a feature plays out "in the real world". A couple of questions
though:

bq: We added 2 Cores options :
Do you mean you patched Solr? If so are you willing to shard the code
back? If both are "yes", please open a JIRA, attach the patch and assign
it to me.

bq:  the number of file descriptors, it used a lot (need to increase global
max and per process fd)

Right, this makes sense since you have a bunch of cores all with their
own descriptors open. I'm assuming that you hit a rather high max
number and it stays pretty steady

bq: the overhead to parse solrconfig.xml and load dependencies to open
each core

Right, I tried to look at sharing the underlying solrconfig object but
it seemed pretty hairy. There are some extensive comments in the
JIRA of the problems I foresaw. There may be some action on this
in the future.

bq: lotsOfCores doesn’t work with SolrCloud

Right, we haven't concentrated on that, it's an interesting problem.
In particular it's not clear what happens when nodes go up/down,
replicate, resynch, all that.

bq: When you start, it spend a lot of times to discover cores due to a big

How long? I tried 15K cores on my laptop and I think I was getting 15
second delays or roughly 1K cores discovered/second. Is your delay
on the order of 50 seconds with 50K cores?

I'm not sure how you could do that in the background, but I haven't
thought about it much. I tried multi-threading core discovery and that
didn't help (SSD disk), I assumed that the problem was mostly I/O
contention (but didn't prove it). What if a request came in for a core
before you'd found it? I'm not sure what the right behavior would be
except perhaps to block on that request until core discovery was
complete. Hm. How would that work for your case? That
seems do-able.

BTW, so far you get the prize for the most cores on a node I think.

Thanks again for the great feedback!

Erick

On Mon, Oct 7, 2013 at 3:53 AM, Soyez Olivier
 wrote:
> Hello,
>
> In my company, we use Solr in production to offer full text search on
> mailboxes.
> We host dozens million of mailboxes, but only webmail users have such
> feature (few millions).
> We have the following use case :
> - non static indexes with more update (indexing and deleting), than
> select requests (ratio 7:1)
> - homogeneous configuration for all indexes
> - not so much user at the same time
>
> We started to index mailboxes with Solr 1.4 in 2010, on a subset of
> 400,000 users.
> - we had a cluster of 50 servers, 4 Solr per server, 2000 users per Solr
> instance
> - we grow to 6000 users per Solr instance, 8 Solr per server, 60Go per
> index (~2 million users)
> - we upgraded to Solr 3.5 in 2012
> As indexes grew, IOPS and the response times have increased more and more.
>
> Th

Re: Solr auto suggestion not working

2013-10-10 Thread Jason Hellman
Very specifically, what is the field definition that is being used for the 
suggestions?

On Oct 10, 2013, at 5:49 AM, Furkan KAMACI  wrote:

> What is your configuration for auto suggestion?
> 
> 
> 2013/10/10 ar...@skillnetinc.com 
> 
>> 
>> 
>> Hi,
>> 
>> We are encountering an issue in solr search auto suggestion feature. Here
>> is
>> the problem statement with an example:
>> We have a product named 'Apple iphone 5s - 16 GB'. Now when in the search
>> box we type 'Apple' or 'iphone' this product name comes in the suggestion
>> list. But when we type 'iphone 5s' no result comes in suggestion list. Even
>> when we type only '5s' then also no result comes.
>> 
>> Please help us in resolving this issue and it is occurring on production
>> environment and impacting client's business.
>> 
>> Regards,
>> Arun
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Solr-auto-suggestion-not-working-tp4094660.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>> 



Re: Field with default value and stored=false, will be reset back to the default value in case of updating other fields

2013-10-10 Thread Jason Hellman
The best use case I see for atomic updates typically involves avoid 
transmission of large documents for small field updates.  If you are updating a 
"readCount" field of a PDF document that is 1MB in size you will avoid 
resending the 1MB PDF document's data in order to increment the "readCount" 
field.

If, instead, we're talking about 5K database records then there's plenty of 
argument to be made that the whole document should just be retransmitted and 
thus avoid the (potentially) unnecessary cost of storing all fields.

As in everything, we face compromises…the question is which one better suits 
your needs.

On Oct 10, 2013, at 5:07 AM, Erick Erickson  wrote:

> bq: so what is the point of having atomic updates if
> i need to update everything?
> 
> _nobody_ claims this is ideal, it does solve a certain use-case.
> We'd all like like true partial-updates that didn't require
> stored fields.
> 
> The use-case here is that you don't have access to the
> system-of-record so you don't have a choice.
> 
> See the JIRA about "stacked segments" for update without
> storing fields work.
> 
> Best,
> Erick
> 
> On Thu, Oct 10, 2013 at 12:09 AM, Shawn Heisey  wrote:
>> On 10/9/2013 8:39 PM, deniz wrote:
>>> Billnbell wrote
 You have to update the whole record including all fields...
>>> 
>>> so what is the point of having atomic updates if i need to update
>>> everything?
>> 
>> If you have any regular fields that are not stored, atomic updates will
>> not work -- unstored field data will be lost.  If you have copyField
>> destination fields that *are* stored, atomic updates will not work as
>> expected with those fields.  The wiki spells out the requirements:
>> 
>> http://wiki.apache.org/solr/Atomic_Updates#Caveats_and_Limitations
>> 
>> An atomic update is just a shortcut for "read all existing fields from
>> the original document, apply the atomic updates, and re-insert the
>> document, overwriting the original."
>> 
>> Thanks,
>> Shawn
>> 



Re: Update existing documents when using ExtractingRequestHandler?

2013-10-10 Thread Jason Hellman
As an endorsement of Erick's like, the primary benefit I see to processing 
through your own code is better error-, exception-, and logging-handling which 
is trivial for you to write.

Consider that your code could reside on any server, either receiving through a 
PUSH or PULLing the data from your web server (as suits your needs) and thus 
offloads the effort from your busy web server.

In the long run, this will be a more flexible, adaptable solution that meets 
future needs with minimal effort.  Further, it typically doesn't require a 
"Solr expert" to write so you can find plenty of people to help on this as 
future needs dictate.


On Oct 10, 2013, at 4:21 AM, Erick Erickson  wrote:

> 1 - puts the work on the Solr server though.
> 2 - This is just a SolrJ program, could be run anywhere. See:
> http://searchhub.org/dev/2012/02/14/indexing-with-solrj/ It would give
> you the most flexibility to offload the Tika processing to N other
> machines.
> 3 - This could work, but you'd then be indexing every document twice
> as well as loading the server with the Tika work. And you'd have to
> store all the fields.
> 
> Personally I like <2>...
> 
> FWIW,
> Erick
> 
> 
> On Wed, Oct 9, 2013 at 11:50 AM, Jeroen Steggink  wrote:
>> Hi,
>> 
>> In a content management system I have a document and an attachment. The
>> document contains the meta data and the attachment the actual data.
>> I would like to combine data of both in one Solr document.
>> 
>> I have thought of several options:
>> 
>> 1. Using ExtractingRequestHandler I would extract the data (extractOnly)
>> and combine it with the meta data and send it to Solr.
>> But this might be inefficient and increase the network traffic.
>> 2. Seperate Tika installation and use that to extract and send the data
>> to Solr.
>> This would stress an already busy web server.
>> 3. First upload the file using ExtractingRequestHandler, then use atomic
>> updates to add the other fields.
>> 
>> Or is there another way? First add the meta data and later use the
>> ExtractingRequestHandler to add the file contents?
>> 
>> Cheers,
>> Jeroen
>> 
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
i added the jars you have listet and recreated a solr.war


2013/10/10 Peter Schmidt 

> OK. I extracted the solr.war in webapps folder. And than out.log reports
>
> 2013-10-10 16:47:28.184:WARN::Config error at  class="java.io.PrintStream">| class="org.mortbay.util.RolloverFileOutputStream"> name="jetty.home" default="."/>/logs/_mm_dd.stderrout.log type="boolean">false90 class="java.util.TimeZone"
> name="getTimeZone">GMT name="datedFilename"/>|  
> java.lang.reflect.InvocationTargetException
> 2013-10-10 16:47:28.191:WARN::EXCEPTION
> java.lang.reflect.InvocationTargetException
>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at
> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
> at
> org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
> at
> org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
> at
> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
> at
> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
> at
> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
> at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.mortbay.start.Main.invokeMain(Main.java:194)
> at org.mortbay.start.Main.start(Main.java:534)
> at
> org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
> 2013-10-10 16:47:28.192:WARN::Nested in
> java.lang.reflect.InvocationTargetException:
> java.io.IOException: Cannot write log file
> /var/log/jetty/2013_10_10.stderrout.log
> at
> org.mortbay.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:233)
> at
> org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:164)
> at
> org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:116)
>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at
> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
> at
> org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
> at
> org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
> at
> org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
> at
> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
> at
> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
> at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.mortbay.start.Main.invokeMain(Main.java:194)
> at org.mortbay.start.Main.start(Main.java:534)
> at
> org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
>
>
> 2013/10/10 Guido Medina 
>
>> Add the following jars inside solr.war WEB-INF/lib folder:
>

Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
OK. I extracted the solr.war in webapps folder. And than out.log reports

2013-10-10 16:47:28.184:WARN::Config error at |/logs/_mm_dd.stderrout.logfalse90GMT|  
java.lang.reflect.InvocationTargetException
2013-10-10 16:47:28.191:WARN::EXCEPTION
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
at
org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
at org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
2013-10-10 16:47:28.192:WARN::Nested in
java.lang.reflect.InvocationTargetException:
java.io.IOException: Cannot write log file
/var/log/jetty/2013_10_10.stderrout.log
at
org.mortbay.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:233)
at
org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:164)
at
org.mortbay.util.RolloverFileOutputStream.(RolloverFileOutputStream.java:116)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:608)
at
org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:915)
at org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:837)
at
org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:593)
at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:256)
at
org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:214)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:974)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)


2013/10/10 Guido Medina 

> Add the following jars inside solr.war WEB-INF/lib folder:
>
> jcl-over-slf4j-1.7.5.jar
> jul-to-slf4j-1.7.5.jar
> log4j-1.2.17.jar
> slf4j-api-1.7.5.jar
> slf4j-log4j12-1.7.5.jar
>
> Optional if you are going to use spatial search:
> jts-1.13.jar
>
> Guido.
>
>
> On 10/10/13 14:33, Peter Schmidt wrote:
>
>> Sorry terminal shows:
>>
>> $ sudo service jetty start
>> Found JAVA=/usr/lib/jvm/java-6-**openjdk/jre/bin/java in JAVA_HOME=/
>> Starting Jetty: FAILED
>>
>>
>> 2013/10/10 Peter Schmidt 
>>
>>  The log:
>>>
>>> 2013-10-10 15:01:47.071:IN

Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina

Add the following jars inside solr.war WEB-INF/lib folder:

jcl-over-slf4j-1.7.5.jar
jul-to-slf4j-1.7.5.jar
log4j-1.2.17.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar

Optional if you are going to use spatial search:
jts-1.13.jar

Guido.

On 10/10/13 14:33, Peter Schmidt wrote:

Sorry terminal shows:

$ sudo service jetty start
Found JAVA=/usr/lib/jvm/java-6-openjdk/jre/bin/java in JAVA_HOME=/
Starting Jetty: FAILED


2013/10/10 Peter Schmidt 


The log:

2013-10-10 15:01:47.071:INFO::jetty-6.1.22
2013-10-10 15:01:47.110:INFO::Deploy /etc/jetty/contexts/javadoc.xml ->
org.mortbay.jetty.handler.ContextHandler@2353f67e
{/javadoc,file:/usr/share/doc/libjetty-java/api/}
2013-10-10 15:01:47.161:INFO::NO JSP Support for , did not find
org.apache.jasper.servlet.JspServlet
2013-10-10 15:01:47.192:INFO::Extract file:/var/lib/jetty/webapps/solr.war
to /tmp/Jetty_0_0_0_0_8080_solr.war__solr__7k9npr/webapp
2013-10-10 15:01:47.761:INFO::NO JSP Support for /solr, did not find
org.apache.jasper.servlet.JspServlet
2013-10-10 15:01:47.868:WARN::failed SolrRequestFilter:
org.apache.solr.common.SolrException: Could not find necessary SLF4j
logging jars. If using Jetty, the SLF4j logging jars need to go in the
jetty lib/ext directory. For other containers, the corresponding directory
should be used. For more information, see:
http://wiki.apache.org/solr/SolrLogging
2013-10-10 15:01:47.869:WARN::Failed startup of context
org.mortbay.jetty.webapp.WebAppContext@a13f991
{/solr,file:/var/lib/jetty/webapps/solr.war}
org.apache.solr.common.SolrException: Could not find necessary SLF4j
logging jars. If using Jetty, the SLF4j logging jars need to go in the
jetty lib/ext directory. For other containers, the corresponding directory
should be used. For more information, see:
http://wiki.apache.org/solr/SolrLogging
 at
org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:104)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
 at java.lang.Class.newInstance0(Class.java:374)
 at java.lang.Class.newInstance(Class.java:327)
 at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
 at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:92)
 at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
 at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
 at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
 at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
 at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
 at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
 at org.mortbay.jetty.Server.doStart(Server.java:224)
 at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.mortbay.start.Main.invokeMain(Main.java:194)
 at org.mortbay.start.Main.start(Main.java:534)
 at org.mortbay.start.Main.start(Main.java:441)
 at org.mortbay.start.Main.main(Main.java:119)
2013-10-10 15:01:47.870:WARN::failed
org.mortbay.jetty.webapp.WebAppContext@a13f991{/solr,file:/var/lib/jetty/webapps/solr.war}:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.870:WARN::failed ContextHandlerCollection@2565a3c2:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.870:INFO::Opened /var/log/jetty/2013_10_10.request.log
2013-10-10 15:01:47.871:WARN::failed HandlerCollection@33e228bc:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.871:WARN::Error starting handler

Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Furkan KAMACI
Did you check here as your logs says:
http://wiki.apache.org/solr/SolrLogging

You have  NoClassDefFoundError: error for org/slf4j/Logger and this is
because of there is a dependency mismatch at your libraries.


2013/10/10 Peter Schmidt 

> >>For repo Jetty (6.1.x) this is a good guide, which is very similar to
> what we have on our environments:
>
> >>http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/>
>
> Guido, i used this guide and ended up with the Page not found 404 problem
> like the others (in the comments)
>
> Only solution there is:
>
> Karel<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/#>
>   vjnunez<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/#comment-926517600
> >
>
> * 4 months ago<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/#comment-926795805
> >
>
>- -<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/#>
>-
>
> I used a different howto for installing jetty 9 from source with solr 4.3.0
> on Ubuntu 13.04 (google it, can't remember the site). Worked for my 12.04
> LTS install, so for me this problem is "fixed".
>
>
>
> 2013/10/10 Guido Medina 
>
> > For repo Jetty (6.1.x) this is a good guide, which is very similar to
> what
> > we have on our environments:
> >
> > http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
> > on-ubuntu-1204/<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/>
> >
> >
> > Guido.
> >
> > On 10/10/13 13:20, Peter Schmidt wrote:
> >
> >> No, it's not working that easy with the jetty 6.1.
> >>
> >> When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
> >> solr.war in the jetty webapps directory i got a 404 when in try to reach
> >> http://localhost:8080 or http://localhost:8080/solr.
> >>
> >>
> >> 2013/10/10 Guido Medina 
> >>
> >>  My I forgot to mention where you need to copy the solr.war file:
> >>>
> >>> /var/lib/jetty/webapps
> >>>
> >>> Guido.
> >>>
> >>>
> >>> On 10/10/13 10:48, Guido Medina wrote:
> >>>
> >>>  Here is the pertinent changes you need to pass to /etc/default/jetty:
> 
> * JAVA_OPTIONS="-Djava.awt.headless=true -Dfile.encoding=UTF-8
> 
>   -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
>   -XX:+OptimizeStringConcat -XX:+UseStringCache"
> * JAVA_OPTIONS="-Dsolr.solr.home=$YOUR_SOLR_COLLECTION_HOME
> 
>   $JAVA_OPTIONS"
> 
> 
>  Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to
> play
>  with it. Adjust your solr collection home to whatever path is on your
>  system.
> 
>  HTH,
> 
>  Guido.
> 
>  On 10/10/13 10:43, Guido Medina wrote:
> 
>   I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
> > repo, we have in production for few years now with no issues, you
> just
> > need
> > to be sure your solr.war has the required jars in it, also your
> > collection
> > must have the extra jars needed by your app.
> >
> > We have been running it in Ubuntu Server 12.04 LTS for a long time,
> it
> > is easy to have the jetty server with default repo package since it
> is
> > easy
> > to pass JVM parameters using /etc/default/jetty config file.
> >
> > HTH,
> >
> > Guido.
> >
> > On 10/10/13 10:02, Furkan KAMACI wrote:
> >
> >  Do you get an error?
> >>
> >>
> >> 2013/10/10 Peter Schmidt 
> >>
> >>   Hey folks,
> >>
> >>> for some days i tried to get Solr 4.4.0 working as a webapp with
> >>> Jetty
> >>> 6.1
> >>> from the Ubuntu repository installed with apt-get. First i tried
> the
> >>> installation according the wiki http://wiki.apache.org/solr/**
> >>> SolrJetty  http://wiki.apache.org/solr/SolrJetty>
> >>> >.
> >>> Then
> >>> i found this example
> >>> http://www.kingstonlabs.com/blog/how-to-install-solr-36-**<
> http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**>
> >>> on-ubuntu-1204/and >>> install-solr-36-on-ubuntu-**1204/and<
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and
> >
> >>> >
> >>>
> >>> tried the Configuration according to the book pache Solr 4 Cookbook
> >>> by
> >>> Rafal Kuc.
> >>> But it semmed to be impossible to  run Solr 4.4.0 as webapp on
> >>> Ubuntus
> >>> jetty 6.1 :(
> >>> Can somebody confirm that it's impossible or give me an advice how
> to
> >>> run
> >>> Solr 4.4.0 on Jetty 6.1?
> >>> Regards
> >>>
> >>>
> >>>
> >
>


Re: Solr Wiki Account

2013-10-10 Thread Joel Bernstein
Thanks!


On Thu, Oct 10, 2013 at 9:48 AM, Stefan Matheis wrote:

> Sure :) I've added it to https://wiki.apache.org/solr/AdminGroup
>
> -Stefan
>
>
> On Thursday, October 10, 2013 at 3:41 PM, Joel Bernstein wrote:
>
> > Hi,
> >
> > Can the account JoelBernstein be granted permission to edit the Solr
> Wiki?
> >
> > Thanks,
> > Joel
> >
> >
>
>
>


-- 
Joel Bernstein
Professional Services LucidWorks


Re: Solr Wiki Account

2013-10-10 Thread Stefan Matheis
Sure :) I've added it to https://wiki.apache.org/solr/AdminGroup

-Stefan 


On Thursday, October 10, 2013 at 3:41 PM, Joel Bernstein wrote:

> Hi,
> 
> Can the account JoelBernstein be granted permission to edit the Solr Wiki?
> 
> Thanks,
> Joel
> 
> 




Solr Wiki Account

2013-10-10 Thread Joel Bernstein
Hi,

Can the account JoelBernstein be granted permission to edit the Solr Wiki?

Thanks,
Joel


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
>>For repo Jetty (6.1.x) this is a good guide, which is very similar to
what we have on our environments:

>>http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/

Guido, i used this guide and ended up with the Page not found 404 problem
like the others (in the comments)

Only solution there is:

Karel
  
vjnunez

* 4 months 
ago

   - -
   -

I used a different howto for installing jetty 9 from source with solr 4.3.0
on Ubuntu 13.04 (google it, can't remember the site). Worked for my 12.04
LTS install, so for me this problem is "fixed".



2013/10/10 Guido Medina 

> For repo Jetty (6.1.x) this is a good guide, which is very similar to what
> we have on our environments:
>
> http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
> on-ubuntu-1204/
>
>
> Guido.
>
> On 10/10/13 13:20, Peter Schmidt wrote:
>
>> No, it's not working that easy with the jetty 6.1.
>>
>> When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
>> solr.war in the jetty webapps directory i got a 404 when in try to reach
>> http://localhost:8080 or http://localhost:8080/solr.
>>
>>
>> 2013/10/10 Guido Medina 
>>
>>  My I forgot to mention where you need to copy the solr.war file:
>>>
>>> /var/lib/jetty/webapps
>>>
>>> Guido.
>>>
>>>
>>> On 10/10/13 10:48, Guido Medina wrote:
>>>
>>>  Here is the pertinent changes you need to pass to /etc/default/jetty:

* JAVA_OPTIONS="-Djava.awt.headless=true -Dfile.encoding=UTF-8

  -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
  -XX:+OptimizeStringConcat -XX:+UseStringCache"
* JAVA_OPTIONS="-Dsolr.solr.home=$YOUR_SOLR_COLLECTION_HOME

  $JAVA_OPTIONS"


 Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to play
 with it. Adjust your solr collection home to whatever path is on your
 system.

 HTH,

 Guido.

 On 10/10/13 10:43, Guido Medina wrote:

  I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
> repo, we have in production for few years now with no issues, you just
> need
> to be sure your solr.war has the required jars in it, also your
> collection
> must have the extra jars needed by your app.
>
> We have been running it in Ubuntu Server 12.04 LTS for a long time, it
> is easy to have the jetty server with default repo package since it is
> easy
> to pass JVM parameters using /etc/default/jetty config file.
>
> HTH,
>
> Guido.
>
> On 10/10/13 10:02, Furkan KAMACI wrote:
>
>  Do you get an error?
>>
>>
>> 2013/10/10 Peter Schmidt 
>>
>>   Hey folks,
>>
>>> for some days i tried to get Solr 4.4.0 working as a webapp with
>>> Jetty
>>> 6.1
>>> from the Ubuntu repository installed with apt-get. First i tried the
>>> installation according the wiki http://wiki.apache.org/solr/**
>>> SolrJetty 
>>> 
>>> >.
>>> Then
>>> i found this example
>>> http://www.kingstonlabs.com/blog/how-to-install-solr-36-**
>>> on-ubuntu-1204/and>> install-solr-36-on-ubuntu-**1204/and
>>> >
>>>
>>> tried the Configuration according to the book pache Solr 4 Cookbook
>>> by
>>> Rafal Kuc.
>>> But it semmed to be impossible to  run Solr 4.4.0 as webapp on
>>> Ubuntus
>>> jetty 6.1 :(
>>> Can somebody confirm that it's impossible or give me an advice how to
>>> run
>>> Solr 4.4.0 on Jetty 6.1?
>>> Regards
>>>
>>>
>>>
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
Sorry terminal shows:

$ sudo service jetty start
Found JAVA=/usr/lib/jvm/java-6-openjdk/jre/bin/java in JAVA_HOME=/
Starting Jetty: FAILED


2013/10/10 Peter Schmidt 

> The log:
>
> 2013-10-10 15:01:47.071:INFO::jetty-6.1.22
> 2013-10-10 15:01:47.110:INFO::Deploy /etc/jetty/contexts/javadoc.xml ->
> org.mortbay.jetty.handler.ContextHandler@2353f67e
> {/javadoc,file:/usr/share/doc/libjetty-java/api/}
> 2013-10-10 15:01:47.161:INFO::NO JSP Support for , did not find
> org.apache.jasper.servlet.JspServlet
> 2013-10-10 15:01:47.192:INFO::Extract file:/var/lib/jetty/webapps/solr.war
> to /tmp/Jetty_0_0_0_0_8080_solr.war__solr__7k9npr/webapp
> 2013-10-10 15:01:47.761:INFO::NO JSP Support for /solr, did not find
> org.apache.jasper.servlet.JspServlet
> 2013-10-10 15:01:47.868:WARN::failed SolrRequestFilter:
> org.apache.solr.common.SolrException: Could not find necessary SLF4j
> logging jars. If using Jetty, the SLF4j logging jars need to go in the
> jetty lib/ext directory. For other containers, the corresponding directory
> should be used. For more information, see:
> http://wiki.apache.org/solr/SolrLogging
> 2013-10-10 15:01:47.869:WARN::Failed startup of context
> org.mortbay.jetty.webapp.WebAppContext@a13f991
> {/solr,file:/var/lib/jetty/webapps/solr.war}
> org.apache.solr.common.SolrException: Could not find necessary SLF4j
> logging jars. If using Jetty, the SLF4j logging jars need to go in the
> jetty lib/ext directory. For other containers, the corresponding directory
> should be used. For more information, see:
> http://wiki.apache.org/solr/SolrLogging
> at
> org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:104)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at java.lang.Class.newInstance0(Class.java:374)
> at java.lang.Class.newInstance(Class.java:327)
> at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
> at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:92)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
> at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> at org.mortbay.jetty.Server.doStart(Server.java:224)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.mortbay.start.Main.invokeMain(Main.java:194)
> at org.mortbay.start.Main.start(Main.java:534)
> at org.mortbay.start.Main.start(Main.java:441)
> at org.mortbay.start.Main.main(Main.java:119)
> 2013-10-10 15:01:47.870:WARN::failed
> org.mortbay.jetty.webapp.WebAppContext@a13f991{/solr,file:/var/lib/jetty/webapps/solr.war}:
> java.lang.NoClassDefFoundError: org/slf4j/Logger
> 2013-10-10 15:01:47.870:WARN::failed ContextHandlerCollection@2565a3c2:
> java.lang.NoClassDefFoundError: org/slf4j/Logger
> 2013-10-10 15:01:47.870:INFO::Opened /var/log/jetty/2013_10_10.request.log
> 2013-10-10 15:01:47.871:WARN::failed HandlerCollection@33e228bc:
> java.lang.NoClassDefFoundError: org/slf4j/Logger
> 2013-10-10 15:01:47.871:WARN::Error starting handlers
> java.lang.NoClassDefFoundError: org/slf4j/Logger
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Cl

Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
The log:

2013-10-10 15:01:47.071:INFO::jetty-6.1.22
2013-10-10 15:01:47.110:INFO::Deploy /etc/jetty/contexts/javadoc.xml ->
org.mortbay.jetty.handler.ContextHandler@2353f67e
{/javadoc,file:/usr/share/doc/libjetty-java/api/}
2013-10-10 15:01:47.161:INFO::NO JSP Support for , did not find
org.apache.jasper.servlet.JspServlet
2013-10-10 15:01:47.192:INFO::Extract file:/var/lib/jetty/webapps/solr.war
to /tmp/Jetty_0_0_0_0_8080_solr.war__solr__7k9npr/webapp
2013-10-10 15:01:47.761:INFO::NO JSP Support for /solr, did not find
org.apache.jasper.servlet.JspServlet
2013-10-10 15:01:47.868:WARN::failed SolrRequestFilter:
org.apache.solr.common.SolrException: Could not find necessary SLF4j
logging jars. If using Jetty, the SLF4j logging jars need to go in the
jetty lib/ext directory. For other containers, the corresponding directory
should be used. For more information, see:
http://wiki.apache.org/solr/SolrLogging
2013-10-10 15:01:47.869:WARN::Failed startup of context
org.mortbay.jetty.webapp.WebAppContext@a13f991
{/solr,file:/var/lib/jetty/webapps/solr.war}
org.apache.solr.common.SolrException: Could not find necessary SLF4j
logging jars. If using Jetty, the SLF4j logging jars need to go in the
jetty lib/ext directory. For other containers, the corresponding directory
should be used. For more information, see:
http://wiki.apache.org/solr/SolrLogging
at
org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:104)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:92)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
2013-10-10 15:01:47.870:WARN::failed
org.mortbay.jetty.webapp.WebAppContext@a13f991{/solr,file:/var/lib/jetty/webapps/solr.war}:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.870:WARN::failed ContextHandlerCollection@2565a3c2:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.870:INFO::Opened /var/log/jetty/2013_10_10.request.log
2013-10-10 15:01:47.871:WARN::failed HandlerCollection@33e228bc:
java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-10-10 15:01:47.871:WARN::Error starting handlers
java.lang.NoClassDefFoundError: org/slf4j/Logger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2482)
at java.lang.Class.getMethod0(Class.java:2725)
at java.lang.Class.getMethod(Class.java:1650)
at org.mortbay.log.Log.unwind(Log.java:228)
at org.mortbay.log.Log.warn(Log.java:197)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:475)
...

And w

Re: Find documents that are composed of % words

2013-10-10 Thread Upayavira
Right - aside from the interesting intellectual exercise, the correct
question to ask is, "why?"

Why would you want to do this? What's the benefit, and is there a way of
doing it that is more in keeping with how Solr has been designed?

Upayavira

On Thu, Oct 10, 2013, at 01:17 PM, Erick Erickson wrote:
> Just to add my $0.02. Often this kind of thing is
> a mistaken assumption on the part of the client
> that they know how to score documents better
> than the really bright people who put a lot of time
> and energy into scoring (note, I'm _certainly_
> not one of those people!). I'll  often, instead of
> making something like this work, see if I can
> tweak the scoring for a "good enough" solution.
> This can be a time-sink of the first magnitude for
> very little actual benefit.
> 
> Very often, if you get "good enough" results and
> put this kind of refinement on the back burner when
> "more important" features are done it never seems
> to percolate up to the point of needing work. And it's
> a disservice to clients to agree to implementing
> something like this without at least discussing
> what you _won't_ be able to do if you do this.
> 
> Best,
> Erick
> 
> 
> 
> On Thu, Oct 10, 2013 at 7:51 AM, Upayavira  wrote:
> >
> >
> > On Wed, Oct 9, 2013, at 02:45 PM, shahzad73 wrote:
> >> my client has a strange requirement,   he will give a list of 500 words
> >> and
> >> then set a percentage like 80%   now he want to find those pages or
> >> documents which consist of the only those 80% of 500   and only 20%
> >> unknown.
> >> like   we have this document
> >>
> >>  word1 word2 word3 word4
> >>
> >> and he give the list  word1 word2 word3 and set the accuracy to 75%
> >> the above doc will meet the criteria because no 1 it matches all words
> >> and
> >> only 25% words are unknow from the list of searches.
> >>
> >> here is another way to say this  " if 500 words are provided in search
> >> then
> >> All 500 words words must exist in the document  and unknow words should
> >> be
> >> only 20%  if accracy is 80%"
> >
> > As best as I can see, Solr can't quite do this, at least without
> > enhancement.
> >
> > There's two parts to how Solr works - boolean querying, in which a
> > document either matches, or doesn't. The first part is to work out how
> > to select the documents you are interested in.
> >
> > The second part is scoring, which involves calculating a score for all
> > of the documents that have got through the previous round.
> >
> > It seems the boolean portion could be achieved using
> > minimum-should-match=100%. That is, all terms must be there.
> >
> > You can almost do the scoring portion by sorting on function queries, by
> > sorting on sum(termfreq(text, 'word1'), termfreq(text, 'word2')) etc -
> > that'd give you the number of times your query terms appear in the
> > field, but the issue is there's no way to record the number of terms in
> > a particular field.
> >
> > Perhaps you could pre-tokenise the field before indexing it, and store
> > the number of terms in your index. Then, your score would be the sum of
> > the termfreq(text, '') values, divided by the total number of
> > terms in the document.
> >
> > Almost there, but the last leg is not quite.
> >
> > I don't know whether it is possible to write a fieldlength(text)
> > function that returns the number of terms in the field.
> >
> > Upayavira


Re: Find documents that are composed of % words

2013-10-10 Thread Aloke Ghoshal
Something you could do via function queries. Performance (for 500+ words)
is a doubtful.

1) With a separate float field (myfieldwordcount) that holds the count of
words from your query field (myfield):

http://localhost:8983/solr/collection1/select?wt=xml&indent=true&defType=func
&fl=id,myfield
&q={!frange l=0.75}div(sum(exists(query({!dismax qf=myfield
v='word1'})),exists(query({!dismax qf=myfield
v='word2'})),exists(query({!dismax qf=myfield
v='word3'}))),myfieldwordcount)

The value for myfieldwordcount will need to worked out externally and added
to Solr for every document.

2) Using field norm as an approximation for word count:*
*(Use default boost =1.0, see:
http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts)
*
*
http://localhost:8983/solr/collection1/select?wt=xml&indent=true&defType=func
&fl=id,myfield
&q={!frange l=0.75}product(sum(exists(query({!dismax qf=myfield
v='word1'})),exists(query({!dismax qf=myfield
v='word2'})),exists(query({!dismax qf=myfield
v='word3'}))),norm(myfield),norm(myfield))

Regards,
Aloke


On Wed, Oct 9, 2013 at 7:21 PM, shahzad73  wrote:

> Please help me formulate the query that will be easy or do i have to build
> a
> custom filter for this ?
>
> Shahzad
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094372.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
For repo Jetty (6.1.x) this is a good guide, which is very similar to 
what we have on our environments:


http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/

Guido.

On 10/10/13 13:20, Peter Schmidt wrote:

No, it's not working that easy with the jetty 6.1.

When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
solr.war in the jetty webapps directory i got a 404 when in try to reach
http://localhost:8080 or http://localhost:8080/solr.


2013/10/10 Guido Medina 


My I forgot to mention where you need to copy the solr.war file:

/var/lib/jetty/webapps

Guido.


On 10/10/13 10:48, Guido Medina wrote:


Here is the pertinent changes you need to pass to /etc/default/jetty:

   * JAVA_OPTIONS="-Djava.awt.**headless=true -Dfile.encoding=UTF-8
 -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
 -XX:+OptimizeStringConcat -XX:+UseStringCache"
   * JAVA_OPTIONS="-Dsolr.solr.**home=$YOUR_SOLR_COLLECTION_**HOME
 $JAVA_OPTIONS"


Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to play
with it. Adjust your solr collection home to whatever path is on your
system.

HTH,

Guido.

On 10/10/13 10:43, Guido Medina wrote:


I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
repo, we have in production for few years now with no issues, you just need
to be sure your solr.war has the required jars in it, also your collection
must have the extra jars needed by your app.

We have been running it in Ubuntu Server 12.04 LTS for a long time, it
is easy to have the jetty server with default repo package since it is easy
to pass JVM parameters using /etc/default/jetty config file.

HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:


Do you get an error?


2013/10/10 Peter Schmidt 

  Hey folks,

for some days i tried to get Solr 4.4.0 working as a webapp with Jetty
6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/**
SolrJetty .
Then
i found this example
http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
on-ubuntu-1204/and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to
run
Solr 4.4.0 on Jetty 6.1?
Regards






Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
On the config I pasted here, Solr mailing list is inserting "**" in 
between dots so make sure you remove those.


Example:

JAVA_OPTIONS="-Dsolr.solr.**home=$YOUR_SOLR_COLLECTION_**HOME 
$JAVA_OPTIONS"


is really:

JAVA_OPTIONS="-Dsolr . solr . home=$YOUR _ SOLR _ COLLECTION _ HOME 
$JAVA_OPTIONS"


Guido.

On 10/10/13 13:51, Guido Medina wrote:
Check the jetty logs, there must be something wrong in your collection 
config, usually if it doesn't start it will tell you there.


And of course, for every change you make be sure you restart jetty.

Guido.

On 10/10/13 13:20, Peter Schmidt wrote:

No, it's not working that easy with the jetty 6.1.

When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
solr.war in the jetty webapps directory i got a 404 when in try to reach
http://localhost:8080 or http://localhost:8080/solr.


2013/10/10 Guido Medina 


My I forgot to mention where you need to copy the solr.war file:

/var/lib/jetty/webapps

Guido.


On 10/10/13 10:48, Guido Medina wrote:


Here is the pertinent changes you need to pass to /etc/default/jetty:

   * JAVA_OPTIONS="-Djava.awt.**headless=true -Dfile.encoding=UTF-8
 -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
 -XX:+OptimizeStringConcat -XX:+UseStringCache"
   * JAVA_OPTIONS="-Dsolr.solr.**home=$YOUR_SOLR_COLLECTION_**HOME
 $JAVA_OPTIONS"


Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to 
play

with it. Adjust your solr collection home to whatever path is on your
system.

HTH,

Guido.

On 10/10/13 10:43, Guido Medina wrote:


I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
repo, we have in production for few years now with no issues, you 
just need
to be sure your solr.war has the required jars in it, also your 
collection

must have the extra jars needed by your app.

We have been running it in Ubuntu Server 12.04 LTS for a long 
time, it
is easy to have the jetty server with default repo package since 
it is easy

to pass JVM parameters using /etc/default/jetty config file.

HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:


Do you get an error?


2013/10/10 Peter Schmidt 

  Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with 
Jetty

6.1
from the Ubuntu repository installed with apt-get. First i tried 
the

installation according the wiki http://wiki.apache.org/solr/**
SolrJetty .
Then
i found this example
http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
on-ubuntu-1204/and 

tried the Configuration according to the book pache Solr 4 
Cookbook by

Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on 
Ubuntus

jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice 
how to

run
Solr 4.4.0 on Jetty 6.1?
Regards








Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
Check the jetty logs, there must be something wrong in your collection 
config, usually if it doesn't start it will tell you there.


And of course, for every change you make be sure you restart jetty.

Guido.

On 10/10/13 13:20, Peter Schmidt wrote:

No, it's not working that easy with the jetty 6.1.

When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
solr.war in the jetty webapps directory i got a 404 when in try to reach
http://localhost:8080 or http://localhost:8080/solr.


2013/10/10 Guido Medina 


My I forgot to mention where you need to copy the solr.war file:

/var/lib/jetty/webapps

Guido.


On 10/10/13 10:48, Guido Medina wrote:


Here is the pertinent changes you need to pass to /etc/default/jetty:

   * JAVA_OPTIONS="-Djava.awt.**headless=true -Dfile.encoding=UTF-8
 -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
 -XX:+OptimizeStringConcat -XX:+UseStringCache"
   * JAVA_OPTIONS="-Dsolr.solr.**home=$YOUR_SOLR_COLLECTION_**HOME
 $JAVA_OPTIONS"


Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to play
with it. Adjust your solr collection home to whatever path is on your
system.

HTH,

Guido.

On 10/10/13 10:43, Guido Medina wrote:


I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
repo, we have in production for few years now with no issues, you just need
to be sure your solr.war has the required jars in it, also your collection
must have the extra jars needed by your app.

We have been running it in Ubuntu Server 12.04 LTS for a long time, it
is easy to have the jetty server with default repo package since it is easy
to pass JVM parameters using /etc/default/jetty config file.

HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:


Do you get an error?


2013/10/10 Peter Schmidt 

  Hey folks,

for some days i tried to get Solr 4.4.0 working as a webapp with Jetty
6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/**
SolrJetty .
Then
i found this example
http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
on-ubuntu-1204/and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to
run
Solr 4.4.0 on Jetty 6.1?
Regards






Re: Solr auto suggestion not working

2013-10-10 Thread Furkan KAMACI
What is your configuration for auto suggestion?


2013/10/10 ar...@skillnetinc.com 

>
>
> Hi,
>
> We are encountering an issue in solr search auto suggestion feature. Here
> is
> the problem statement with an example:
> We have a product named 'Apple iphone 5s - 16 GB'. Now when in the search
> box we type 'Apple' or 'iphone' this product name comes in the suggestion
> list. But when we type 'iphone 5s' no result comes in suggestion list. Even
> when we type only '5s' then also no result comes.
>
> Please help us in resolving this issue and it is occurring on production
> environment and impacting client's business.
>
> Regards,
> Arun
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-auto-suggestion-not-working-tp4094660.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Furkan KAMACI
Hi Peter;

You can learn its version as like that:

java -jar start.jar --version


2013/10/10 Peter Schmidt 

> Is the integrated jetty in Solr 4.4.0 a jetty version 9 or 7 or 8 ?
>
>
> 2013/10/10 Peter Schmidt 
>
> > Your right. it worked although for me with Jetty 9. You mean 9.0.6
> >  and i was talking about jetty 6.1 which come with ubuntus packing.
> >
> > So i think i would use the solr with the integrated jetty.
> >
> >
> > 2013/10/10 maephisto 
> >
> >> Tried it and worked as expected with latest version of Jetty (.0.6 if I
> >> remember correctly) and Solr 4.4.0
> >> This tutorial should help you (it's verified by me and working):
> >>
> http://dcvan24.wordpress.com/2013/05/16/how-to-deploy-solr-4-3-on-jetty-9/
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://lucene.472066.n3.nabble.com/Solr-4-4-0-on-Ubuntu-10-04-with-Jetty-6-1-from-package-Repository-tp4094617p4094646.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >>
> >
> >
>


Solr auto suggestion not working

2013-10-10 Thread ar...@skillnetinc.com


Hi,

We are encountering an issue in solr search auto suggestion feature. Here is
the problem statement with an example:
We have a product named 'Apple iphone 5s - 16 GB'. Now when in the search
box we type 'Apple' or 'iphone' this product name comes in the suggestion
list. But when we type 'iphone 5s' no result comes in suggestion list. Even
when we type only '5s' then also no result comes.

Please help us in resolving this issue and it is occurring on production
environment and impacting client's business.

Regards,
Arun




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-auto-suggestion-not-working-tp4094660.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
Is the integrated jetty in Solr 4.4.0 a jetty version 9 or 7 or 8 ?


2013/10/10 Peter Schmidt 

> Your right. it worked although for me with Jetty 9. You mean 9.0.6
>  and i was talking about jetty 6.1 which come with ubuntus packing.
>
> So i think i would use the solr with the integrated jetty.
>
>
> 2013/10/10 maephisto 
>
>> Tried it and worked as expected with latest version of Jetty (.0.6 if I
>> remember correctly) and Solr 4.4.0
>> This tutorial should help you (it's verified by me and working):
>> http://dcvan24.wordpress.com/2013/05/16/how-to-deploy-solr-4-3-on-jetty-9/
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Solr-4-4-0-on-Ubuntu-10-04-with-Jetty-6-1-from-package-Repository-tp4094617p4094646.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
Your right. it worked although for me with Jetty 9. You mean 9.0.6
 and i was talking about jetty 6.1 which come with ubuntus packing.

So i think i would use the solr with the integrated jetty.


2013/10/10 maephisto 

> Tried it and worked as expected with latest version of Jetty (.0.6 if I
> remember correctly) and Solr 4.4.0
> This tutorial should help you (it's verified by me and working):
> http://dcvan24.wordpress.com/2013/05/16/how-to-deploy-solr-4-3-on-jetty-9/
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-4-4-0-on-Ubuntu-10-04-with-Jetty-6-1-from-package-Repository-tp4094617p4094646.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
No, it's not working that easy with the jetty 6.1.

When i just add -Dsolr.solr.home to my /etc/default/jetty and put the
solr.war in the jetty webapps directory i got a 404 when in try to reach
http://localhost:8080 or http://localhost:8080/solr.


2013/10/10 Guido Medina 

> My I forgot to mention where you need to copy the solr.war file:
>
> /var/lib/jetty/webapps
>
> Guido.
>
>
> On 10/10/13 10:48, Guido Medina wrote:
>
>> Here is the pertinent changes you need to pass to /etc/default/jetty:
>>
>>   * JAVA_OPTIONS="-Djava.awt.**headless=true -Dfile.encoding=UTF-8
>> -server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
>> -XX:+OptimizeStringConcat -XX:+UseStringCache"
>>   * JAVA_OPTIONS="-Dsolr.solr.**home=$YOUR_SOLR_COLLECTION_**HOME
>> $JAVA_OPTIONS"
>>
>>
>> Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to play
>> with it. Adjust your solr collection home to whatever path is on your
>> system.
>>
>> HTH,
>>
>> Guido.
>>
>> On 10/10/13 10:43, Guido Medina wrote:
>>
>>> I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu
>>> repo, we have in production for few years now with no issues, you just need
>>> to be sure your solr.war has the required jars in it, also your collection
>>> must have the extra jars needed by your app.
>>>
>>> We have been running it in Ubuntu Server 12.04 LTS for a long time, it
>>> is easy to have the jetty server with default repo package since it is easy
>>> to pass JVM parameters using /etc/default/jetty config file.
>>>
>>> HTH,
>>>
>>> Guido.
>>>
>>> On 10/10/13 10:02, Furkan KAMACI wrote:
>>>
 Do you get an error?


 2013/10/10 Peter Schmidt 

  Hey folks,
> for some days i tried to get Solr 4.4.0 working as a webapp with Jetty
> 6.1
> from the Ubuntu repository installed with apt-get. First i tried the
> installation according the wiki http://wiki.apache.org/solr/**
> SolrJetty .
> Then
> i found this example
> http://www.kingstonlabs.com/**blog/how-to-install-solr-36-**
> on-ubuntu-1204/and
> tried the Configuration according to the book pache Solr 4 Cookbook by
> Rafal Kuc.
> But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
> jetty 6.1 :(
> Can somebody confirm that it's impossible or give me an advice how to
> run
> Solr 4.4.0 on Jetty 6.1?
> Regards
>
>
>>>
>>
>


Re: Find documents that are composed of % words

2013-10-10 Thread Erick Erickson
Just to add my $0.02. Often this kind of thing is
a mistaken assumption on the part of the client
that they know how to score documents better
than the really bright people who put a lot of time
and energy into scoring (note, I'm _certainly_
not one of those people!). I'll  often, instead of
making something like this work, see if I can
tweak the scoring for a "good enough" solution.
This can be a time-sink of the first magnitude for
very little actual benefit.

Very often, if you get "good enough" results and
put this kind of refinement on the back burner when
"more important" features are done it never seems
to percolate up to the point of needing work. And it's
a disservice to clients to agree to implementing
something like this without at least discussing
what you _won't_ be able to do if you do this.

Best,
Erick



On Thu, Oct 10, 2013 at 7:51 AM, Upayavira  wrote:
>
>
> On Wed, Oct 9, 2013, at 02:45 PM, shahzad73 wrote:
>> my client has a strange requirement,   he will give a list of 500 words
>> and
>> then set a percentage like 80%   now he want to find those pages or
>> documents which consist of the only those 80% of 500   and only 20%
>> unknown.
>> like   we have this document
>>
>>  word1 word2 word3 word4
>>
>> and he give the list  word1 word2 word3 and set the accuracy to 75%
>> the above doc will meet the criteria because no 1 it matches all words
>> and
>> only 25% words are unknow from the list of searches.
>>
>> here is another way to say this  " if 500 words are provided in search
>> then
>> All 500 words words must exist in the document  and unknow words should
>> be
>> only 20%  if accracy is 80%"
>
> As best as I can see, Solr can't quite do this, at least without
> enhancement.
>
> There's two parts to how Solr works - boolean querying, in which a
> document either matches, or doesn't. The first part is to work out how
> to select the documents you are interested in.
>
> The second part is scoring, which involves calculating a score for all
> of the documents that have got through the previous round.
>
> It seems the boolean portion could be achieved using
> minimum-should-match=100%. That is, all terms must be there.
>
> You can almost do the scoring portion by sorting on function queries, by
> sorting on sum(termfreq(text, 'word1'), termfreq(text, 'word2')) etc -
> that'd give you the number of times your query terms appear in the
> field, but the issue is there's no way to record the number of terms in
> a particular field.
>
> Perhaps you could pre-tokenise the field before indexing it, and store
> the number of terms in your index. Then, your score would be the sum of
> the termfreq(text, '') values, divided by the total number of
> terms in the document.
>
> Almost there, but the last leg is not quite.
>
> I don't know whether it is possible to write a fieldlength(text)
> function that returns the number of terms in the field.
>
> Upayavira


Re: matching "starts with" only

2013-10-10 Thread Erick Erickson
Be aware that the string type is not analyzed in any way,
so your searches are case sensitive. There's a "lowercase"
type in the example schema.xml that combines
KeywordTokenizer with LowercaseFilter for case-insensitive
searches that you might find useful.

Besides regex, this might be a good place or wildcards, just
black*.

Best,
Erick

On Thu, Oct 10, 2013 at 7:31 AM, adm1n  wrote:
> I've changed the field name to string type, the default one presented in
> schema.xml, and I got what I needed.
>
>
> thanks for your time.
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/matching-starts-with-only-tp4094430p4094637.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Help to figure out why query does not match

2013-10-10 Thread heaven
Hi Erick, I am finally got back to this issue.

Here is the wish I've created:
https://issues.apache.org/jira/browse/SOLR-5332

Best,
Alex



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Help-to-figure-out-why-query-does-not-match-tp4086967p4094652.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Field with default value and stored=false, will be reset back to the default value in case of updating other fields

2013-10-10 Thread Erick Erickson
bq: so what is the point of having atomic updates if
i need to update everything?

_nobody_ claims this is ideal, it does solve a certain use-case.
We'd all like like true partial-updates that didn't require
stored fields.

The use-case here is that you don't have access to the
system-of-record so you don't have a choice.

See the JIRA about "stacked segments" for update without
storing fields work.

Best,
Erick

On Thu, Oct 10, 2013 at 12:09 AM, Shawn Heisey  wrote:
> On 10/9/2013 8:39 PM, deniz wrote:
>> Billnbell wrote
>>> You have to update the whole record including all fields...
>>
>> so what is the point of having atomic updates if i need to update
>> everything?
>
> If you have any regular fields that are not stored, atomic updates will
> not work -- unstored field data will be lost.  If you have copyField
> destination fields that *are* stored, atomic updates will not work as
> expected with those fields.  The wiki spells out the requirements:
>
> http://wiki.apache.org/solr/Atomic_Updates#Caveats_and_Limitations
>
> An atomic update is just a shortcut for "read all existing fields from
> the original document, apply the atomic updates, and re-insert the
> document, overwriting the original."
>
> Thanks,
> Shawn
>


Re: run filter queries after post filter

2013-10-10 Thread Erick Erickson
Rohit:

Ah, ok. I think Jim nailed it. The whole idea of post filters though,
is to use them when the filter is expensive. Do you have evidence
that the fq you're trying to use as a post-filter is "expensive"? I.e.
&fq={!cache=false cost=200}field:value takes time? Or are you
doing something in your post-filter that requires access to the
docs before the cost=200 field is applied?

Because the end result set is the same, the docs have to make it
through _all_ the fq clauses to be returned since you can
think of fq clauses as intersections.

Best,
Erick

On Wed, Oct 9, 2013 at 6:18 PM, jim ferenczi  wrote:
> Hi Rohit,
> The main problem is that if the query inside the filter does not have a
> PostFilter implementation then your post filter is silently transformed
> into a simple filter. The query "field:value" is based on the inverted
> lists and does not have a postfilter support.
> If your field is a numeric field take a look at the frange query parser
> which has post filter support:
> To filter out document with a field value less than 5:
> fq={!frange l=5 cache=false cost=200}field(myField)
>
> Cheers,
> Jim
>
>
> 2013/10/9 Rohit Harchandani 
>
>> yes i get that. actually i should have explained in more detail.
>>
>> - i have a query which gets certain documents.
>> - the post filter gets these matched documents and does some processing on
>> them and filters the results.
>> - but after this is done i need to apply another filter - which is why i
>> gave a higher cost to it.
>>
>> the reason i need to do this is because the processing done by the post
>> filter depends on the documents matching the query till that point.
>> since the normal fq clause is also getting executed before the post filter
>> (despite the cost), the final results are not accurate
>>
>> thanks
>> Rohit
>>
>>
>>
>>
>> On Wed, Oct 9, 2013 at 4:14 PM, Erick Erickson > >wrote:
>>
>> > Ah, I think you're misunderstanding the nature of post-filters.
>> > Or I'm confused, which happens a lot!
>> >
>> > The whole point of post filters is that they're assumed to be
>> > expensive (think ACL calculation). So you want them to run
>> > on the fewest documents possible. So only docs that make it
>> > through the primary query _and_ all lower-cost filters will get
>> > to this post-filter. This means they can't be cached for
>> > instance, because they don't see (hopefully) very many docs.
>> >
>> > This is radically different than normal fq clauses, which are
>> > calculated on the entire corpus and can thus be cached.
>> >
>> > Best,
>> > Erick
>> >
>> > On Wed, Oct 9, 2013 at 11:59 AM, Rohit Harchandani 
>> > wrote:
>> > > Hey,
>> > > so the post filter logs the number of ids that it receives.
>> > > With the above filter having cost=200, the post filter should have
>> > received
>> > > the same number of ids as before ( when the filter was not present ).
>> > > But that does not seem to be the case...with the filter query on the
>> > index,
>> > > the number of ids that the post filter is receiving reduces.
>> > >
>> > > Thanks,
>> > > Rohit
>> > >
>> > >
>> > > On Tue, Oct 8, 2013 at 8:29 PM, Erick Erickson <
>> erickerick...@gmail.com
>> > >wrote:
>> > >
>> > >> Hmmm, seems like it should. What's our evidence that it isn't working?
>> > >>
>> > >> Best,
>> > >> Erick
>> > >>
>> > >> On Tue, Oct 8, 2013 at 4:10 PM, Rohit Harchandani 
>> > >> wrote:
>> > >> > Hey,
>> > >> > I am using solr 4.0 with my own PostFilter implementation which is
>> > >> executed
>> > >> > after the normal solr query is done. This filter has a cost of 100.
>> > Is it
>> > >> > possible to run filter queries on the index after the execution of
>> the
>> > >> post
>> > >> > filter?
>> > >> > I tried adding the below line to the url but it did not seem to
>> work:
>> > >> > &fq={!cache=false cost=200}field:value
>> > >> > Thanks,
>> > >> > Rohit
>> > >>
>> >
>>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread maephisto
Tried it and worked as expected with latest version of Jetty (.0.6 if I
remember correctly) and Solr 4.4.0
This tutorial should help you (it's verified by me and working):
http://dcvan24.wordpress.com/2013/05/16/how-to-deploy-solr-4-3-on-jetty-9/




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-4-4-0-on-Ubuntu-10-04-with-Jetty-6-1-from-package-Repository-tp4094617p4094646.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr's Filtering approaches

2013-10-10 Thread Erick Erickson
Well, my first question is why 50K groups is necessary, and
whether you can simplify that. How a user can manually
choose from among that many groups is "interesting". But
assuming they're all necessary, I can think of two things.

If the user can only select ranges, just put in filter queries
using ranges. Or possibly both ranges and individual entries,
as fq=group:[1A TO 1A] OR group:(2B 45C 98Z) etc.
You need to be a little careful how you put index these so
range queries work properly, in the above you'd miss
2A because it's sorting lexicographically, you'd need to
store in some form that sorts like 001A 01A
and so on. You wouldn't need to show that form to the
user, just form your fq's in the app to work with
that form.

If that won't work (you wouldn't want this to get huge), think
about a "post filter" that would only operate on documents that
had made it through the select, although how to convey which
groups the user selected to the post filter is an open
question.

Best,
Erick

On Wed, Oct 9, 2013 at 12:23 PM, David Philip
 wrote:
> Hi All,
>
> I have an issue in handling filters for one of our requirements and
> liked to get suggestion  for the best approaches.
>
>
> *Use Case:*
>
> 1.  We have List of groups and the number of groups can increase upto >1
> million. Currently we have almost 90 thousand groups in the solr search
> system.
>
> 2.  Just before the user hits a search, He has options to select the no. of
>  groups he want to retrieve. [the distinct list of these group Names for
> display are retrieved from other solr index that has more information about
> groups]
>
> *3.User Operation:** *
> Say if user selected group 1A  - group 1A.  and searches for key:cancer.
>
>
> The current approach I was thinking is : get search results and filter
> query by groupids' list selected by user. But my concern is When these
> groups list is increasing to >50k unique Ids, This can cause lot of delay
> in getting search results. So wanted to know whether there are different
>  filtering ways that I can try for?
>
> I was thinking of one more approach as suggested by my colleague to do -
>  intersection.  -
> Get the groupIds' selected by user.
> Get the list of groupId's from search results,
> Perform intersection of both and then get the entire result set of only
> those groupid that intersected. Is this better way? Can I use any cache
> technique in this case?
>
>
> - David.


Re: Find documents that are composed of % words

2013-10-10 Thread Upayavira


On Wed, Oct 9, 2013, at 02:45 PM, shahzad73 wrote:
> my client has a strange requirement,   he will give a list of 500 words
> and
> then set a percentage like 80%   now he want to find those pages or
> documents which consist of the only those 80% of 500   and only 20%
> unknown.
> like   we have this document   
> 
>  word1 word2 word3 word4   
> 
> and he give the list  word1 word2 word3 and set the accuracy to 75%   
> the above doc will meet the criteria because no 1 it matches all words  
> and
> only 25% words are unknow from the list of searches. 
> 
> here is another way to say this  " if 500 words are provided in search
> then
> All 500 words words must exist in the document  and unknow words should
> be
> only 20%  if accracy is 80%"

As best as I can see, Solr can't quite do this, at least without
enhancement.

There's two parts to how Solr works - boolean querying, in which a
document either matches, or doesn't. The first part is to work out how
to select the documents you are interested in.

The second part is scoring, which involves calculating a score for all
of the documents that have got through the previous round.

It seems the boolean portion could be achieved using
minimum-should-match=100%. That is, all terms must be there. 

You can almost do the scoring portion by sorting on function queries, by
sorting on sum(termfreq(text, 'word1'), termfreq(text, 'word2')) etc -
that'd give you the number of times your query terms appear in the
field, but the issue is there's no way to record the number of terms in
a particular field.

Perhaps you could pre-tokenise the field before indexing it, and store
the number of terms in your index. Then, your score would be the sum of
the termfreq(text, '') values, divided by the total number of
terms in the document.

Almost there, but the last leg is not quite.

I don't know whether it is possible to write a fieldlength(text)
function that returns the number of terms in the field.

Upayavira


Re: Find documents that are composed of % words

2013-10-10 Thread Upayavira


On Wed, Oct 9, 2013, at 02:45 PM, shahzad73 wrote:
> my client has a strange requirement,   he will give a list of 500 words
> and
> then set a percentage like 80%   now he want to find those pages or
> documents which consist of the only those 80% of 500   and only 20%
> unknown.
> like   we have this document   
> 
>  word1 word2 word3 word4   
> 
> and he give the list  word1 word2 word3 and set the accuracy to 75%   
> the above doc will meet the criteria because no 1 it matches all words  
> and
> only 25% words are unknow from the list of searches. 
> 
> here is another way to say this  " if 500 words are provided in search
> then
> All 500 words words must exist in the document  and unknow words should
> be
> only 20%  if accracy is 80%"

As best as I can see, Solr can't quite do this, at least without
enhancement.

There's two parts to how Solr works - boolean querying, in which a
document either matches, or doesn't. The first part is to work out how
to select the documents you are interested in.

The second part is scoring, which involves calculating a score for all
of the documents that have got through the previous round.

It seems the boolean portion could be achieved using
minimum-should-match=100%. That is, all terms must be there. 

You can almost do the scoring portion by sorting on function queries, by
sorting on sum(termfreq(text, 'word1'), termfreq(text, 'word2')) etc -
that'd give you the number of times your query terms appear in the
field, but the issue is there's no way to record the number of terms in
a particular field.

Perhaps you could pre-tokenise the field before indexing it, and store
the number of terms in your index. Then, your score would be the sum of
the termfreq(text, '') values, divided by the total number of
terms in the document.

Almost there, but the last leg is not quite.

I don't know whether it is possible to write a fieldlength(text)
function that returns the number of terms in the field.

Upayavira


Re: Find documents that are composed of % words

2013-10-10 Thread Furkan KAMACI
Hi;

Your question seems like an example of minimum should match feature and
Aloke has answered it. However I've wanted to mention about dedup mechanism
at Solr (http://wiki.apache.org/solr/Deduplication) if *mm* parameter is
not you are looking for and if you want to do something more special.
Deduplication detects similar documents. Some of them are hash based and
that is not you are looking for. However there is a fuzzy dedup mechanism
and it may help you if you need more than what* mm* parameter provides you.


2013/10/10 shahzad73 

> No did not get it unfortunately how this will help meexplain a bit in
> details
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094630.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: matching "starts with" only

2013-10-10 Thread adm1n
I've changed the field name to string type, the default one presented in
schema.xml, and I got what I needed.


thanks for your time.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/matching-starts-with-only-tp4094430p4094637.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Update existing documents when using ExtractingRequestHandler?

2013-10-10 Thread Erick Erickson
1 - puts the work on the Solr server though.
2 - This is just a SolrJ program, could be run anywhere. See:
http://searchhub.org/dev/2012/02/14/indexing-with-solrj/ It would give
you the most flexibility to offload the Tika processing to N other
machines.
3 - This could work, but you'd then be indexing every document twice
as well as loading the server with the Tika work. And you'd have to
store all the fields.

Personally I like <2>...

FWIW,
Erick


On Wed, Oct 9, 2013 at 11:50 AM, Jeroen Steggink  wrote:
> Hi,
>
> In a content management system I have a document and an attachment. The
> document contains the meta data and the attachment the actual data.
> I would like to combine data of both in one Solr document.
>
> I have thought of several options:
>
> 1. Using ExtractingRequestHandler I would extract the data (extractOnly)
> and combine it with the meta data and send it to Solr.
>  But this might be inefficient and increase the network traffic.
> 2. Seperate Tika installation and use that to extract and send the data
> to Solr.
>  This would stress an already busy web server.
> 3. First upload the file using ExtractingRequestHandler, then use atomic
> updates to add the other fields.
>
> Or is there another way? First add the meta data and later use the
> ExtractingRequestHandler to add the file contents?
>
> Cheers,
> Jeroen
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: Using Solr Cell to index the internal structure of a PDF

2013-10-10 Thread Furkan KAMACI
You can have a look here:
http://solr.pl/en/2011/04/04/indexing-files-like-doc-pdf-solr-and-tika-integration/


2013/10/10 Peter Bleackley 

> I'm trying to index a set of PDF documents with Solr 4.5.0. So far I can
> get Solr to ingest the entire document as one long string, stored in the
> index as "content". However, I want to index structure within the documents.
>
> I know that the ExtractingRequestHandler uses Apache Tika to convert the
> documents to XHTML. I've used the Tika GUI to look at the XHTML
> representation, and I can see that each page is represented as a 
> element, and that structure within pages is represented by  elements.
> How do I configure Solr to index documents at this level of granularity?
>
> Dr Peter J Bleackley
> Computational Linguistics Contractor
> Playful Technology Ltd
>


Re: Find documents that are composed of % words

2013-10-10 Thread shahzad73
No did not get it unfortunately how this will help meexplain a bit in
details



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Find-documents-that-are-composed-of-words-tp4094264p4094630.html
Sent from the Solr - User mailing list archive at Nabble.com.


Using Solr Cell to index the internal structure of a PDF

2013-10-10 Thread Peter Bleackley
I'm trying to index a set of PDF documents with Solr 4.5.0. So far I can 
get Solr to ingest the entire document as one long string, stored in the 
index as "content". However, I want to index structure within the documents.


I know that the ExtractingRequestHandler uses Apache Tika to convert the 
documents to XHTML. I've used the Tika GUI to look at the XHTML 
representation, and I can see that each page is represented as a  
element, and that structure within pages is represented by  elements. 
How do I configure Solr to index documents at this level of granularity?


Dr Peter J Bleackley
Computational Linguistics Contractor
Playful Technology Ltd


Please help!, Highlighting exact phrases with solr

2013-10-10 Thread Silvia Suárez
I am using solrj as client for indexing documents on the solr server I am
new to solr, And I am having problem with the highlighting in solr.
Highlighting exact phrases with solr does not work.

For example if the search keyword is: "dulce hogar" it returns:

 dulce   hogar 

 And it should be:

 dulce hogar 

I don't understand which is the problem. Can someone  helpme please!?


Mi Solrj program code is:


SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery(queryEnt);
solrQuery.set("collectionName", myCollection);
solrQuery.addHighlightField("texto")
 .addHighlightField("titular")
 .setHighlightSnippets(50)
 .setHighlightFragsize(1);
solrQuery.setHighlight(true);
solrQuery.setHighlightRequireFieldMatch(true);


//solrQuery.setHighlightRequireFieldMatch(true);
solrQuery.setHighlightSimplePre("");
solrQuery.setHighlightSimplePost("");


solrQuery.set("hl.usePhraseHighlighter", true);



My configuration in schema.xml



 






  
  






  



And in solrconfig.xml

 


  explicit
  10
   text
  true



 



  
  
  

  100

  

  
  

  
  70
  
  0.5
  
  [-\w ,/\n\"']{20,200}
  true
  true

  

  
  

  
  

  


missing anything?

Thanks a lot for some help in advance,
Silvia



*
*
*Tecnologías y SaaS para el análisis de marcas comerciales.*


Nota:
Usted ha recibido este mensaje al estar en la libreta de direcciones del
remitente, en los archivos de la empresa o mediante el sistema de
“responder” al ser usted la persona que contactó por este medio con el
remitente. En caso de no querer recibir ningún email mas del remitente o de
cualquier miembro de la organización a la que pertenece, por favor,
responda a este email solicitando la baja de su dirección en nuestros
archivos.

Advertencia legal:
Este mensaje y, en su caso, los ficheros anexos son confidenciales,
especialmente en lo que respecta a los datos personales, y se dirigen
exclusivamente al destinatario referenciado. Si usted no lo es y lo ha
recibido por error o tiene conocimiento del mismo por cualquier motivo, le
rogamos que nos lo comunique por este medio y proceda a destruirlo o
borrarlo, y que en todo caso se abstenga de utilizar, reproducir, alterar,
archivar o comunicar a terceros el presente mensaje y ficheros anexos, todo
ello bajo pena de incurrir en responsabilidades legales.


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina

My I forgot to mention where you need to copy the solr.war file:

/var/lib/jetty/webapps

Guido.

On 10/10/13 10:48, Guido Medina wrote:

Here is the pertinent changes you need to pass to /etc/default/jetty:

  * JAVA_OPTIONS="-Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
-XX:+OptimizeStringConcat -XX:+UseStringCache"
  * JAVA_OPTIONS="-Dsolr.solr.home=$YOUR_SOLR_COLLECTION_HOME
$JAVA_OPTIONS"


Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to 
play with it. Adjust your solr collection home to whatever path is on 
your system.


HTH,

Guido.

On 10/10/13 10:43, Guido Medina wrote:
I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu 
repo, we have in production for few years now with no issues, you 
just need to be sure your solr.war has the required jars in it, also 
your collection must have the extra jars needed by your app.


We have been running it in Ubuntu Server 12.04 LTS for a long time, 
it is easy to have the jetty server with default repo package since 
it is easy to pass JVM parameters using /etc/default/jetty config file.


HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:

Do you get an error?


2013/10/10 Peter Schmidt 


Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with 
Jetty 6.1

from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty.
Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and 


tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how 
to run

Solr 4.4.0 on Jetty 6.1?
Regards









Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina

Here is the pertinent changes you need to pass to /etc/default/jetty:

 * JAVA_OPTIONS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
   -Xms8g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
   -XX:+OptimizeStringConcat -XX:+UseStringCache"
 * JAVA_OPTIONS="-Dsolr.solr.home=$YOUR_SOLR_COLLECTION_HOME $JAVA_OPTIONS"


Of course, the 1st JAVA_OPTIONS are our own tuning, you are free to play 
with it. Adjust your solr collection home to whatever path is on your 
system.


HTH,

Guido.

On 10/10/13 10:43, Guido Medina wrote:
I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu 
repo, we have in production for few years now with no issues, you just 
need to be sure your solr.war has the required jars in it, also your 
collection must have the extra jars needed by your app.


We have been running it in Ubuntu Server 12.04 LTS for a long time, it 
is easy to have the jetty server with default repo package since it is 
easy to pass JVM parameters using /etc/default/jetty config file.


HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:

Do you get an error?


2013/10/10 Peter Schmidt 


Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with 
Jetty 6.1

from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty.
Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and 


tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how 
to run

Solr 4.4.0 on Jetty 6.1?
Regards







Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Guido Medina
I can confirm solr 3.x and 4.x runs fine with jetty 6.x from Ubuntu 
repo, we have in production for few years now with no issues, you just 
need to be sure your solr.war has the required jars in it, also your 
collection must have the extra jars needed by your app.


We have been running it in Ubuntu Server 12.04 LTS for a long time, it 
is easy to have the jetty server with default repo package since it is 
easy to pass JVM parameters using /etc/default/jetty config file.


HTH,

Guido.

On 10/10/13 10:02, Furkan KAMACI wrote:

Do you get an error?


2013/10/10 Peter Schmidt 


Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty.
Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to run
Solr 4.4.0 on Jetty 6.1?
Regards





Re: {soft}Commit and cache flusing

2013-10-10 Thread Dmitry Kan
Tim,

my suggestion was very concise, sorry for that. But not at all "rude" or
anything. Instead, tried to help you.

Dmitry


On Wed, Oct 9, 2013 at 9:28 PM, Tim Vaillancourt wrote:

> Apologies all. I think the suggestion that I was replying "to get noticed"
> is what erked me, otherwise I would have moved on. I'll follow this advice.
>
> Cheers,
>
> Tim
>
>
> On 9 October 2013 05:20, Erick Erickson  wrote:
>
> > Tim:
> >
> > I think you're mis-interpreting. By replying to a post with the subject:
> >
> > {soft}Commit and cache flushing
> >
> > but going in a different direction, it's easy for people to think "I'm
> > not interested in that
> > thread, I'll ignore it", thereby missing the fact that you're asking a
> > somewhat different
> > question that they might have information about. It's not about whether
> > you're
> > doing anything particularly wrong with the question. It's about making
> > it easy for
> > people to help.
> >
> > See http://people.apache.org/~hossman/#threadhijack
> >
> > Best,
> > Erick
> >
> > On Tue, Oct 8, 2013 at 6:23 PM, Tim Vaillancourt 
> > wrote:
> > > I have a genuine question with substance here. If anything this
> > > nonconstructive, rude response was "to get noticed". Thanks for
> > > contributing to the discussion.
> > >
> > > Tim
> > >
> > >
> > > On 8 October 2013 05:31, Dmitry Kan  wrote:
> > >
> > >> Tim,
> > >> I suggest you open a new thread and not reply to this one to get
> > noticed.
> > >> Dmitry
> > >>
> > >>
> > >> On Mon, Oct 7, 2013 at 9:44 PM, Tim Vaillancourt <
> t...@elementspace.com
> > >> >wrote:
> > >>
> > >> > Is there a way to make autoCommit only commit if there are pending
> > >> changes,
> > >> > ie: if there are 0 adds pending commit, don't autoCommit
> > (open-a-searcher
> > >> > and wipe the caches)?
> > >> >
> > >> > Cheers,
> > >> >
> > >> > Tim
> > >> >
> > >> >
> > >> > On 2 October 2013 00:52, Dmitry Kan  wrote:
> > >> >
> > >> > > right. We've got the autoHard commit configured only atm. The
> > >> > soft-commits
> > >> > > are controlled on the client. It was just easier to implement the
> > first
> > >> > > version of our internal commit policy that will commit to all solr
> > >> > > instances at once. This is where we have noticed the reported
> > behavior.
> > >> > >
> > >> > >
> > >> > > On Wed, Oct 2, 2013 at 9:32 AM, Bram Van Dam <
> bram.van...@intix.eu>
> > >> > wrote:
> > >> > >
> > >> > > > if there are no modifications to an index and a softCommit or
> > >> > hardCommit
> > >> > >  issued, then solr flushes the cache.
> > >> > > 
> > >> > > >>>
> > >> > > > Indeed. The easiest way to work around this is by disabling auto
> > >> > commits
> > >> > > > and only commit when you have to.
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
>


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Tobias Kabbeck

Am 10.10.13 11:05, schrieb Stefan Matheis:

Is there a specific reason you are trying to use that jetty instead of the 
provided one?

No not really. I'm already using the provided one.
But since i spend some tries on it i want to know if somebody is 
successfully using it that way :)






-Stefan


On Thursday, October 10, 2013 at 11:01 AM, Peter Schmidt wrote:


Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty. Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/ and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to run
Solr 4.4.0 on Jetty 6.1?
Regards







--
Tobias Kabbeck
--
ZEIT ONLINE
Askanischer Platz 1
10963 Berlin
--
tobias.kabb...@zeit.de
Tel:   +49 (0)30 322 950 175
Mobil: +49 (0)160 96966428
--
www.zeit.de



DIE ZEIT jetzt am Kiosk.
www.zeit.de/diesewoche



ZEIT ONLINE - Durchschauen Sie jeden Tag.
www.zeit.de



___
Zeitverlag Gerd Bucerius GmbH & Co. KG, 20079 Hamburg
Geschäftsführer: Dr. Rainer Esser
Handelsregister Hamburg HRA 91123
Amtsgericht Hamburg
http://www.zeit.de/


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Tobias Kabbeck

Am 10.10.13 11:02, schrieb Furkan KAMACI:

Do you get an error?


As Webapp like in

http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/

i got a 404

Recipe from the cookbook produces some errors in the jetty log. i thinks the 
jetty.xml an the Java Class is different.




2013/10/10 Peter Schmidt 


Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty.
Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to run
Solr 4.4.0 on Jetty 6.1?
Regards




--
Tobias Kabbeck
--
ZEIT ONLINE
Askanischer Platz 1
10963 Berlin
--
tobias.kabb...@zeit.de
Tel:   +49 (0)30 322 950 175
Mobil: +49 (0)160 96966428
--
www.zeit.de



DIE ZEIT jetzt am Kiosk.
www.zeit.de/diesewoche



ZEIT ONLINE - Durchschauen Sie jeden Tag.
www.zeit.de



___
Zeitverlag Gerd Bucerius GmbH & Co. KG, 20079 Hamburg
Geschäftsführer: Dr. Rainer Esser
Handelsregister Hamburg HRA 91123
Amtsgericht Hamburg
http://www.zeit.de/


Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Stefan Matheis
Is there a specific reason you are trying to use that jetty instead of the 
provided one?

-Stefan 


On Thursday, October 10, 2013 at 11:01 AM, Peter Schmidt wrote:

> Hey folks,
> for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
> from the Ubuntu repository installed with apt-get. First i tried the
> installation according the wiki http://wiki.apache.org/solr/SolrJetty. Then
> i found this example
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/ and
> tried the Configuration according to the book pache Solr 4 Cookbook by
> Rafal Kuc.
> But it semmed to be impossible to run Solr 4.4.0 as webapp on Ubuntus
> jetty 6.1 :(
> Can somebody confirm that it's impossible or give me an advice how to run
> Solr 4.4.0 on Jetty 6.1?
> Regards
> 
> 




Re: Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Furkan KAMACI
Do you get an error?


2013/10/10 Peter Schmidt 

> Hey folks,
> for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
> from the Ubuntu repository installed with apt-get. First i tried the
> installation according the wiki http://wiki.apache.org/solr/SolrJetty.
> Then
> i found this example
> http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/and
> tried the Configuration according to the book pache Solr 4 Cookbook by
> Rafal Kuc.
> But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
> jetty 6.1 :(
> Can somebody confirm that it's impossible or give me an advice how to run
> Solr 4.4.0 on Jetty 6.1?
> Regards
>


Solr 4.4.0 on Ubuntu 10.04 with Jetty 6.1 from package Repository

2013-10-10 Thread Peter Schmidt
Hey folks,
for some days i tried to get Solr 4.4.0 working as a webapp with Jetty 6.1
from the Ubuntu repository installed with apt-get. First i tried the
installation according the wiki http://wiki.apache.org/solr/SolrJetty. Then
i found this example
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/ and
tried the Configuration according to the book pache Solr 4 Cookbook by
Rafal Kuc.
But it semmed to be impossible to  run Solr 4.4.0 as webapp on Ubuntus
jetty 6.1 :(
Can somebody confirm that it's impossible or give me an advice how to run
Solr 4.4.0 on Jetty 6.1?
Regards


Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread xinwu
Thank you ,Shawn.

I solved that problem by using the "-Dbootstrap_conf=true" configuration
instead of the "-Dbootstrap_confdir=/opt/Solr_home/collection1/conf
-Dcollection.configName=solrConfig" on startup.

But,another problem showed up.

I had two collections (collection1,collection2) when I started my Solr.
Collection1 and Collection2 had different schema.

Then I created two other collections in my project which had the same schema
with the collection2.
But these two new collections only had "data" directory, which means there
was no 'conf' directory.

And when I started my solr again,some errors showed up because of the
missing of 'conf' directory.

How should I do?

Thanks.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094607.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Multiple schemas in the same SolrCloud ?

2013-10-10 Thread xinwu
Thank you,kamaci.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multiple-schemas-in-the-same-SolrCloud-tp4094279p4094594.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrCloud+Tomcat ; 3 windows VMs, 3 shards * 2 replica

2013-10-10 Thread magnum87
for further informations, when I delete and recreate Collections with
collection API, my SolR HOME changes (instead of having directories core1,
core2, core3... I have core1_shard1_replica1, core1_shard3_replica2)...

This happens with or without the 'persistent' on solr.xml. If persistent is
TRUE, new core names are reflected in solr.xml



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-Tomcat-3-windows-VMs-3-shards-2-replica-tp4094051p4094591.html
Sent from the Solr - User mailing list archive at Nabble.com.