Re: to create index for the data without document

2012-06-16 Thread robinsolr
HI Gora,

Actually presently i am creating index in which document information is used
for indexing but now i want to create index where no document is used, I
want to know that whether this is done by same schema for indexing or we
have to create separate schema . presently when we create index without
document it throws exception so when no document found how it creates index.

Thanks 

--
View this message in context: 
http://lucene.472066.n3.nabble.com/to-create-index-for-the-data-without-document-tp3989994p3989996.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: to create index for the data without document

2012-06-16 Thread Gora Mohanty
On 17 June 2012 11:13, robinsolr  wrote:
> I want o create index for the information without document what we have to
> do.please sort out this problem

What does that mean. Please explain in further detail,
as an index without a document seems absurd. Do you
mean that you have the information that you want to
index in some form other than a file-system document?
If so, it is possible to handle this use case: What form
is the information in?

You might also wish to read http://wiki.apache.org/solr/UsingMailingLists

Regards,
Gora


to create index for the data without document

2012-06-16 Thread robinsolr
I want o create index for the information without document what we have to
do.please sort out this problem

--
View this message in context: 
http://lucene.472066.n3.nabble.com/to-create-index-for-the-data-without-document-tp3989994.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: KeywordTokenizerFactory with SynonymFilterFactory

2012-06-16 Thread Peyman Faratin
thank you Michael.

On Jun 16, 2012, at 6:40 PM, Michael Ryan wrote:

> Try changing the tokenizer2 SynonymFilterFactory filter to this:
> 
>  ignoreCase="false" expand="true" 
> tokenizerFactory="solr.KeywordTokenizerFactory"/>
> 
> By default, it seems that it uses WhitespaceTokenizer.
> 
> -Michael



Re: solr java.lang.NullPointerException on select queries

2012-06-16 Thread Erick Erickson
Can you tell us more about how you ran the second server? Is this an
independent installation or is it the same installation as your first
server just starting with a different port?

Because this is very strange. It half feels like there are conflicting
jars somewhere in your path, but that's a guess. This really shouldn't
be happening unless something _did_ change that doesn't seem
important but is

And does this only happen when both servers are running? If you turn
the second one off and this still occurs, it _really_ sounds like clashing
jar files

Best
Erick

On Sat, Jun 16, 2012 at 3:39 PM, avenka  wrote:
> I have recently started getting the error pasted below with solr-3.6 on
> /select queries. I don't know of anything that changed in the config to
> start causing this error. I am also running a second independent solr server
> on the same machine, which continues to run fine and has the same
> configuration as the first one except for the port number. The first one
> seems to be doing dataimport operations fine and updating index files as
> usual, but fails on select queries. An example of a failing query (that used
> to run fine) is:
> http:///solr/select/?q=title%3Afoo&version=2.2&start=0&rows=10&indent=on
>
> I am stupefied. Any idea?
>
> HTTP ERROR 500
>
> Problem accessing /solr/select/. Reason:
>
> null
> java.lang.NullPointerException at
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:398)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326) at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/solr-java-lang-NullPointerException-on-select-queries-tp3989974.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: solr exception occur during index creating

2012-06-16 Thread Erick Erickson
Hmmm, there's not much information to go on here. What were you trying to do?
What version of Solr are you using? What does the rest of the stack trace
look like?

You might review: http://wiki.apache.org/solr/UsingMailingLists

Best
Erick

On Sat, Jun 16, 2012 at 1:58 AM, robinsolr  wrote:
> Hi All,
>
> I am using solr server to create index, but during index creation i am
> facing following error, Let me know if naybody resolve this issue
>
>
> request:
> http://solr.c2gcampus.com/update/extract?literal.entityid=1013#2&literal.entitycode=2&literal.docfilepath=/school_3/documentType_1/data/52.pdf&literal.docfiletype=1&literal.doccreatedby=101&literal.docfilename=Applicant_Report-BY_CATEGORY.pdf&literal.dockeyword=gdffdg&literal.libauthor=hghgh&literal.libtitle=book98&literal.libonlinecount=1&literal.libisno=53456&literal.libpublisher=&literal.libsubjectid=3&literal.libcategory=0&literal.cschoolid=3&literal.libkeywords=gdffdg&literal.libdocid=52&commit=true&waitFlush=true&waitSearcher=true&wt=xml&version=2.2>
> 2012-06-15 10:59:28,243 ERROR
> [com.connecttwogurukul.base.solrj.util.SolrPlainUpdateQuery.createLibraryIndex:87]
> - <[SolrPlainUpdateQuery][createLibraryIndex] SolrException
> ERROR:org.apache.solr.common.SolrException: Not Found
>
> Not Found
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/solr-exception-occur-during-index-creating-tp3989946.html
> Sent from the Solr - User mailing list archive at Nabble.com.


RE: KeywordTokenizerFactory with SynonymFilterFactory

2012-06-16 Thread Michael Ryan
Try changing the tokenizer2 SynonymFilterFactory filter to this:



By default, it seems that it uses WhitespaceTokenizer.

-Michael


KeywordTokenizerFactory with SynonymFilterFactory

2012-06-16 Thread Peyman Faratin
Hi

I have the following 2 field types


  


  
  


 

  




  


  
  


 
  


The problem I am seeing is if I have an entry as this in the "synonyms.txt" file

helping hand => assistance

then issuing "helping hand" query (with dismax) to the field tokenized with 
tokenizer1 returns the correct query ("assistance") whereas there is no synonym 
mapping for tokenizer2 (confirmed in Solr admin panel). 

Am I doing something wrong?

thank you




solr java.lang.NullPointerException on select queries

2012-06-16 Thread avenka
I have recently started getting the error pasted below with solr-3.6 on
/select queries. I don't know of anything that changed in the config to
start causing this error. I am also running a second independent solr server
on the same machine, which continues to run fine and has the same
configuration as the first one except for the port number. The first one
seems to be doing dataimport operations fine and updating index files as
usual, but fails on select queries. An example of a failing query (that used
to run fine) is:
http:///solr/select/?q=title%3Afoo&version=2.2&start=0&rows=10&indent=on

I am stupefied. Any idea?

HTTP ERROR 500

Problem accessing /solr/select/. Reason:

null
java.lang.NullPointerException at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:398)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326) at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-java-lang-NullPointerException-on-select-queries-tp3989974.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Writing index files that have the right owner

2012-06-16 Thread Dmitry Kan
Well, since solr is running under Tomcat, I would assume it inherits the
rights from it. Now question is, what are the rights the Tomcat runs with
under Windows?
On the windows shell: in Win 7 for exampe in order to perform Admin level
changes you need to start it under Admin.

Dmitry

On Sat, Jun 16, 2012 at 2:28 AM, Mike O'Leary  wrote:

> I have been putting together an application using Quartz to run several
> indexing jobs in sequence using SolrJ and Tomcat on Windows. I would like
> the Quartz job to do the following:
>
> 1.   Delete index directories from the cores so each indexing job
> starts fresh with empty indexes to populate.
>
> 2.   Start the Tomcat server.
>
> 3.   Run the indexing job.
>
> 4.   Stop the Tomcat server.
>
> 5.   Copy the index directories to an archive.
>
> Steps 2-5 work fine, but I haven't been able to find a way to delete the
> index directories from within Java. I also can't delete them from a Windows
> command shell window: I get an error message that says "Access is denied".
> The reason for this is that the index directories and files have the owner
> "BUILTIN\Administrators". Although I am an administrator on this machine,
> the fact that these files have a different owner means that I can only
> delete them in a Windows command shell window if I start it with "Run as
> administrator". I spent a bunch of time today trying every Java function
> and Windows shell command I could find that would let me change the owner
> of these files, grant my user account the capability to delete the files,
> etc. Nothing I tried worked, likely because along with not having
> permission to delete the files, I also don't have permission to give myself
> permission to delete the files.
>
> At a certain point I stopped wondering how to change the files owner or
> permissions and started wondering why the files have
> "BUILTIN\Administrators" as owner, and the permissions associated with that
> owner, in the first place. Is there somewhere in the Solr or Tomcat
> configuration files, or in the SolrJ code, where I can set who the owner of
> files written to the index directories should be?
> Thanks,
> Mike
>



-- 
Regards,

Dmitry Kan


Re: SolrJ indexing pdf documents

2012-06-16 Thread Sami Siren
On Sat, Jun 16, 2012 at 5:59 PM, 12rad  wrote:
> Hi,
>
> I'm new to SolrJ.

Hi and welcome!

> Here I are the steps I followed to write an application to index pdf
> documents to fresh solr3.6
>
> 1 -In Schema.xml:
> I added the fields I wanted indexed and changed stored = true.
>
> 2 - Started Solr using java -jar start.jar from the /example dir in Solr 3.6
>
> 3- In my application I start the server
> solrServer = new CommonsHttpSolrServer(url);
> solrServer.setParser(new XMLResponseParser());
>
> 4 - i index the data like this:
> ContentStreamUpdateRequest index  = new
> ContentStreamUpdateRequest("/update/extract");
> index.setParam("literal.id", "doc");
> index.setParam(CommonParams.STREAM_FILE, "/location/x.pdf");
> index.setParam(CommonParams.STREAM_CONTENTTYPE, "application/pdf");
> index.setParam(UpdateParams.COMMIT, "true");

Are you sending the request to solr? ie something like

solrServer.request(index);

Here's a simple snippet that sends a pdf to be indexed in solr (3.6):

SolrServer server = ...
ContentStreamUpdateRequest req = new ContentStreamUpdateRequest(
"/update/extract");
req.setParam("literal.id", "doc");
req.addFile(new File(

"solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr-word.pdf"));
server.request(req);
server.commit();

--
 Sami Siren


Re: How to update one field without losing the others?

2012-06-16 Thread preetesh dubey
Just googled and found that this facility is available in DSE search. I
don't know much about DSE but pasting the link here if someone can
get benefit from it.

http://www.datastax.com/docs/datastax_enterprise2.0/search/dse_search_cluster#updating-individual-fields-in-a-solr-document


On Sat, Jun 16, 2012 at 8:17 PM, Yonik Seeley wrote:

> Atomic update is a very new feature coming in 4.0 (i.e. grab a recent
> nightly build to try it out).
>
> It's not documented yet, but here's the JIRA issue:
>
> https://issues.apache.org/jira/browse/SOLR-139?focusedCommentId=13269007&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13269007
>
> -Yonik
> http://lucidimagination.com
>



-- 
Thanks & Regards
Preetesh Dubey


SolrJ indexing pdf documents

2012-06-16 Thread 12rad
Hi, 

I'm new to SolrJ. 
Here I are the steps I followed to write an application to index pdf
documents to fresh solr3.6

1 -In Schema.xml:
I added the fields I wanted indexed and changed stored = true.

2 - Started Solr using java -jar start.jar from the /example dir in Solr 3.6

3- In my application I start the server
solrServer = new CommonsHttpSolrServer(url);
solrServer.setParser(new XMLResponseParser());

4 - i index the data like this:
ContentStreamUpdateRequest index  = new
ContentStreamUpdateRequest("/update/extract");
index.setParam("literal.id", "doc");
index.setParam(CommonParams.STREAM_FILE, "/location/x.pdf");
index.setParam(CommonParams.STREAM_CONTENTTYPE, "application/pdf");
index.setParam(UpdateParams.COMMIT, "true");

5 - I commit using solrServer.commit().

When I run a simple query like *:* - don't see anything. The numDocs that
have been indexed is still 0. 
What I doing incorrectly?
Any help would be greatly appreciated. 

Thanks!

--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrJ-indexing-pdf-documents-tp3989965.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to update one field without losing the others?

2012-06-16 Thread Yonik Seeley
Atomic update is a very new feature coming in 4.0 (i.e. grab a recent
nightly build to try it out).

It's not documented yet, but here's the JIRA issue:
https://issues.apache.org/jira/browse/SOLR-139?focusedCommentId=13269007&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13269007

-Yonik
http://lucidimagination.com


Re: How to update one field without losing the others?

2012-06-16 Thread Thiago
I'm already downloading the document and updating it with all the changes. I
thought it had an easier way to do it. 
Thanks for the information, Michael Della Bitta.

Thiago de Sousa Silveira

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-update-one-field-without-losing-the-others-tp3989959p3989962.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to update one field without losing the others?

2012-06-16 Thread Michael Della Bitta
There's no current provision for this. I would suggest downloading the
document, making your changes, and uploading the document again.

Michael Della Bitta


Appinions, Inc. -- Where Influence Isn’t a Game.
http://www.appinions.com


On Sat, Jun 16, 2012 at 8:59 AM, Thiago  wrote:
> Hi people,
>
> I'm trying to update one field of my solr database, but I update all the
> others fields. For example, if I have a record with the following fields id,
> name, address and phone and I try to update just id and address, the name
> and the phone vanishes. Is there any way to keep those fields in a update
> command? I've already searched this and I found this
> http://lucene.472066.n3.nabble.com/Update-Index-Updating-Specific-Fields-td506165.html
> http://lucene.472066.n3.nabble.com/Update-Index-Updating-Specific-Fields-td506165.html
> and it tells that I can't do this without losing my fields, but it was
> posted in 2010. Is this functionality present in solr nowadays?
>
> Thanks to everybody,
>
> Thiago
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-to-update-one-field-without-losing-the-others-tp3989959.html
> Sent from the Solr - User mailing list archive at Nabble.com.


How to update one field without losing the others?

2012-06-16 Thread Thiago
Hi people,

I'm trying to update one field of my solr database, but I update all the
others fields. For example, if I have a record with the following fields id,
name, address and phone and I try to update just id and address, the name
and the phone vanishes. Is there any way to keep those fields in a update
command? I've already searched this and I found this 
http://lucene.472066.n3.nabble.com/Update-Index-Updating-Specific-Fields-td506165.html
http://lucene.472066.n3.nabble.com/Update-Index-Updating-Specific-Fields-td506165.html
 
and it tells that I can't do this without losing my fields, but it was
posted in 2010. Is this functionality present in solr nowadays?

Thanks to everybody,

Thiago



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-update-one-field-without-losing-the-others-tp3989959.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: StreamingUpdateSolrServer Connection Timeout Setting

2012-06-16 Thread Kissue Kissue
Thanks Sami. Has anybody had any need to explicitly set the connection
timeout? Just trying to understand how folks use it.

Thanks.

On Fri, Jun 15, 2012 at 7:01 PM, Sami Siren  wrote:

> The api doc for version 3.6.0 is available here:
>
> http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/impl/StreamingUpdateSolrServer.html
>
> I think the default is coming from your OS if you are not setting it
> explicitly.
>
> --
>  Sami Siren
>
> On Fri, Jun 15, 2012 at 8:22 PM, Kissue Kissue 
> wrote:
> > Hi,
> >
> > Does anybody know what the default connection timeout setting is for
> > StreamingUpdateSolrServer? Can i explicitly set one and how?
> >
> > Thanks.
>