Re: BlockPostingsFormat

2012-10-13 Thread Jan Høydahl
Have not tested, but have you read this page? 
http://wiki.apache.org/solr/SchemaXml

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

13. okt. 2012 kl. 02:42 skrev varun srivastava :

> Hi,
> How can I enable BlockPostingsFormat for my solr 4.0 code ? Does we have
> soem solrconfig switch ?
> 
> Thanks
> Varun



Solr4 without slf4j bindings -- apparent catch-22

2012-10-13 Thread Shawn Heisey
I'm trying to get a Solr4 install going, building without slf4j 
bindings.  I am using branch_4x from svn, and using a homegrown init 
script.  That script is modeled on what I already have working for 
version 3.5.0.  Solr and Jetty live in /opt/solr4, and the init script 
does a chdir to that directory before firing up jetty.  I am pointing 
solr.home at /index/solr4, using -Dsolr.solr.home.  
/index/solr4/solr.xml exists and has sharedLib="lib".


If I use the standard .war file, sharedLib works as I would expect it 
to.  The solr.xml file is found and it finds the sharedLib directory 
just fine, as you can see from this log excerpt:


Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
locateSolrHome

INFO: using system property solr.solr.home: /index/solr4
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
INFO: new SolrResourceLoader for deduced Solr Home: '/index/solr4/'
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/mysql-connector-java-5.1.21-bin.jar' 
to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader

INFO: Adding 'file:/index/solr4/lib/slf4j-api-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader

INFO: Adding 'file:/index/solr4/lib/log4j-1.2.17.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader

INFO: Adding 'file:/index/solr4/lib/slf4j-log4j12-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/log4j-over-slf4j-1.7.2.jar' to 
classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader 
replaceClassLoader

INFO: Adding 'file:/index/solr4/lib/jcl-over-slf4j-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()

The problem that I am having is with the -excl-slf4j.war file, which I 
am trying to use in order to use log4j instead of jdk logging.  When I 
do that, it seems to be unable to find the sharedLib folder in 
solr.xml.  Because it can't find any slf4j bindings at all, I cannot see 
what's going on in the log.  Entire log included:


2012-10-13 02:21:52.972:INFO:oejs.Server:jetty-8.1.2.v20120308
2012-10-13 02:21:52.988:INFO:oejs.NCSARequestLog:Opened 
/opt/solr4/logs/request.2012_21_13.log
2012-10-13 02:21:52.992:INFO:oejdp.ScanningAppProvider:Deployment 
monitor /opt/solr4/contexts at interval 0
2012-10-13 02:21:52.995:INFO:oejd.DeploymentManager:Deployable added: 
/opt/solr4/contexts/solr.xml
2012-10-13 02:21:53.710:INFO:oejw.StandardDescriptorProcessor:NO JSP 
Support for /solr, did not find org.apache.jasper.servlet.JspServlet
2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started 
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war
2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started 
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for 
further details.


I also tried putting the slf4j jars in /opt/solr4/lib (jetty's lib 
directory).  Unsurprisingly, there was no change. Where can I put the 
jars to make this work, and how to I tell jetty/solr where to find 
them?  I would very much like to avoid having to specify individual jars 
on the java commandline, because of the upgrade pain that will cause.


Thanks,
Shawn



Re: which api to use to manage solr ?

2012-10-13 Thread autregalaxie
I want to develop o search engine, it's an academic project, i need some
low-level APIes for this, and to make a choice wich one use for this project
to manage Solr, develop additionnal functions...

Thank you



--
View this message in context: 
http://lucene.472066.n3.nabble.com/which-api-to-use-to-manage-solr-tp4013491p4013532.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr - db-data-config.xml general asking to entity

2012-10-13 Thread Marvin
Hi there!
I have 2 tables 'blog' and 'comment'. A blog can contains n comments (blog
--1:n-- comment). Up to date I use following select to insert the data into
solr index:






The index result looks like:


 1
 12
 blog of title 1
 message of blog 1
 message of comment

   

 1
 12
 blog of title 1
 message of blog 1
 message of comment - Im the second
comment


I would say this is stupid because I got too many index data with the same
blog just the comments are different. Is it possible to set 'comments' as
'subentity' like following:


 
 
  
  
  



Is that possible?
How would the result looks like (cant test it until monday)?
All example I found the "sub" entity just select 1 column but I need at
least 2.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-db-data-config-xml-general-asking-to-entity-tp4013533.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr4 without slf4j bindings -- apparent catch-22

2012-10-13 Thread Shawn Heisey

On 10/13/2012 3:43 AM, Shawn Heisey wrote:
The problem that I am having is with the -excl-slf4j.war file, which I 
am trying to use in order to use log4j instead of jdk logging.  When I 
do that, it seems to be unable to find the sharedLib folder in 
solr.xml.  Because it can't find any slf4j bindings at all, I cannot 
see what's going on in the log. Entire log included:


2012-10-13 02:21:52.972:INFO:oejs.Server:jetty-8.1.2.v20120308
2012-10-13 02:21:52.988:INFO:oejs.NCSARequestLog:Opened 
/opt/solr4/logs/request.2012_21_13.log
2012-10-13 02:21:52.992:INFO:oejdp.ScanningAppProvider:Deployment 
monitor /opt/solr4/contexts at interval 0
2012-10-13 02:21:52.995:INFO:oejd.DeploymentManager:Deployable added: 
/opt/solr4/contexts/solr.xml
2012-10-13 02:21:53.710:INFO:oejw.StandardDescriptorProcessor:NO JSP 
Support for /solr, did not find org.apache.jasper.servlet.JspServlet
2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started 
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war 

2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started 
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war 


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for 
further details.


I also tried putting the slf4j jars in /opt/solr4/lib (jetty's lib 
directory).  Unsurprisingly, there was no change. Where can I put the 
jars to make this work, and how to I tell jetty/solr where to find 
them?  I would very much like to avoid having to specify individual 
jars on the java commandline, because of the upgrade pain that will 
cause.


As an interim measure, I tried putting the jars in a separate directory 
and added a commandline option for the classpath.  I also downgraded to 
1.6.4, because despite asking for a war without it, the war still 
contains slf4j-api version 1.6.4. The log still shows that it failed to 
find a logger binding - no difference from above.


java -classpath libsolr/log4j-1.2.17.jar:libsolr/slf4j-log4j12-1.6.4.jar 
-jar start.jar


In other news, I finally got jetty to pay attention to my 
logging.properties file for jdk logging, but I had to do it with a 
-Djava.util.logging.config.file=etc/logging.properties option. Trying to 
set that property in jetty.xml according to the wiki didn't work.  I 
notice that the example says 'mortbay' ... perhaps Jetty 8 does it 
differently?


http://wiki.apache.org/solr/LoggingInDefaultJettySetup

I would really prefer to use log4j ... can anyone tell me how I can go 
about doing this successfully?


Thanks,
Shawn



Solr4 - no examples of postingsFormat in schema.xml

2012-10-13 Thread Shawn Heisey
The wiki page for schema.xml shows the syntax for postingsFormat in a 
schema fieldType definition, but it doesn't tell you what to use for the 
value.  Also, the example configs in the solr download do not include 
this parameter.


http://wiki.apache.org/solr/SchemaXml#Data_Types

For some fields, I am interested in using the BlockPostingsFormat that 
will become the default in 4.1.  For others, specifically fields that 
consist entirely of unique values, I would like to try one of the other 
formats, like the Bloom filter.


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

Can someone with the appropriate knowledge update the wiki with some 
values that would cover the majority of normal use cases, and what kinds 
of problems each one is designed to solve?


Thanks,
Shawn



Re: Solr4 - no examples of postingsFormat in schema.xml

2012-10-13 Thread Walter Underwood
There is a bit more info in this post, look for "alternative codecs":

http://searchhub.org/dev/2012/10/12/apache-solr-and-lucene-4-0-0-released/

wunder

On Oct 13, 2012, at 10:46 PM, Shawn Heisey wrote:

> The wiki page for schema.xml shows the syntax for postingsFormat in a schema 
> fieldType definition, but it doesn't tell you what to use for the value.  
> Also, the example configs in the solr download do not include this parameter.
> 
> http://wiki.apache.org/solr/SchemaXml#Data_Types
> 
> For some fields, I am interested in using the BlockPostingsFormat that will 
> become the default in 4.1.  For others, specifically fields that consist 
> entirely of unique values, I would like to try one of the other formats, like 
> the Bloom filter.
> 
> https://issues.apache.org/jira/browse/LUCENE-4069
> 
> Can someone with the appropriate knowledge update the wiki with some values 
> that would cover the majority of normal use cases, and what kinds of problems 
> each one is designed to solve?
> 
> Thanks,
> Shawn
>