Re: Version Conflict on Atomic Update

2013-08-19 Thread Syao Work
Your _version_ does not match.


On Fri, Aug 9, 2013 at 7:08 PM, Bruno René Santos wrote:

> Using the document interface on the Solr admin i try to update the
> following document:
>
> { "responseHeader": { "status": 0, "QTime": 1, "params": { "indent":
> "true",
> "q": "*:*", "_": "1376064413493", "wt": "json" } }, "response": {
> "numFound":
> 1, "start": 0, "docs": [ { "id": "change.me", "author": "change.me", "
> author_s": "change.me", "_version_": 1442907922893897700 } ] } }
>
> with the following change:
>
> {
> "id": "change.me",
> "author": {"set":"change.me1"},
> "_version_": 1442907922893897700
>   }
>
> Which returns the error:
>
> Status: error
> Error: Conflict
> Error:
>
> {
>   "responseHeader": {
> "status": 409,
> "QTime": 0
>   },
>   "error": {
> "msg": "version conflict for change.me
> expected=1442907922893897700 actual=1442907922893897728",
> "code": 409
>   }
> }
> Why this happens? I am on version 4.4
> ThanxBruno
>
>
> --
> Bruno René Santos
> Lisboa - Portugal
>


Re: Indexing directories and files in a File System. (Fetched: 2, Processed: 0)

2013-03-06 Thread Syao Work
So you are suggesting me to iterate file system and index fs tree entities
including: directory names, file names, file size etc. and then post it to
solr?
I need to index the FS tree, not the file contents.

On Tue, Mar 5, 2013 at 5:54 PM, Erik Hatcher  wrote:

> Would Solr's post.jar work for you?   It has a directory recurse option.
>  The usage/help output is pasted below.
>
> Here's what should work for you: "java -Dauto -Drecursive -jar post.jar
> /some/folder"
>
> Erik
>
>
>
> exampledocs  java -jar post.jar --help
> SimplePostTool version 1.5
> Usage: java [SystemProperties] -jar post.jar [-h|-] [
> [...]]
>
> Supported System Properties and their defaults:
>   -Ddata=files|web|args|stdin (default=files)
>   -Dtype= (default=application/xml)
>   -Durl= (default=http://localhost:8983/solr/update)
>   -Dauto=yes|no (default=no)
>   -Drecursive=yes|no| (default=0)
>   -Ddelay= (default=0 for files, 10 for web)
>   -Dfiletypes=[,,...]
> (default=xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log)
>   -Dparams="=[&=...]" (values must be URL-encoded)
>   -Dcommit=yes|no (default=yes)
>   -Doptimize=yes|no (default=no)
>   -Dout=yes|no (default=no)
>
> This is a simple command line tool for POSTing raw data to a Solr
> port.  Data can be read from files specified as commandline args,
> URLs specified as args, as raw commandline arg strings or via STDIN.
> Examples:
>   java -jar post.jar *.xml
>   java -Ddata=args  -jar post.jar '42'
>   java -Ddata=stdin -jar post.jar < hd.xml
>   java -Ddata=web -jar post.jar http://example.com/
>   java -Dtype=text/csv -jar post.jar *.csv
>   java -Dtype=application/json -jar post.jar *.json
>   java -Durl=http://localhost:8983/solr/update/extract -Dparams=literal.id=a
> -Dtype=application/pdf -jar post.jar a.pdf
>   java -Dauto -jar post.jar *
>   java -Dauto -Drecursive -jar post.jar afolder
>   java -Dauto -Dfiletypes=ppt,html -jar post.jar afolder
> The options controlled by System Properties include the Solr
> URL to POST to, the Content-Type of the data, whether a commit
> or optimize should be executed, and whether the response should
> be written to STDOUT. If auto=yes the tool will try to set type
> and url automatically from file name. When posting rich documents
> the file name will be propagated as "resource.name" and also used
> as "literal.id". You may override these or any other request parameter
> through the -Dparams property. To do a commit only, use "-" as argument.
> The web mode is a simple crawler following links within domain, default
> delay=10s.
>
>
> On Mar 5, 2013, at 04:38 , Syao Work wrote:
>
> > Hello,
> >
> > I am trying to index some FS folder tree.
> > Spent 2 days finding what could be the problem - got nothing :) There
> are not so much examples on indexing File System.
> > In the logs I cant find any exceptions why it does not process the info
> > Data import configuration and debug response are attached
> >
> >
> > Using:
> > 1. solr web admin tool,
> > 2. Java version "1.7.0_09-icedtea"
> >OpenJDK Runtime Environment (fedora-2.3.7.0.fc17-x86_64)
> >OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
> >
> > Thank you for your time,
> > Ro
> >
> > P.S. Excuse my bad English, I am not a native English speaker.
> > 
>
>


Re: Indexing directories and files in a File System. (Fetched: 2, Processed: 0)

2013-03-05 Thread Syao Work
Can you send an example?

On Tue, Mar 5, 2013 at 5:11 PM, Gora Mohanty  wrote:

> On 5 March 2013 18:22, Syao Work  wrote:
> > And if I need to index file name, path, size and/or mime?
> [...]
>
> You would need to create separate entities for each field that
> you need to index. The referenced Wiki page on DIH has
> other examples of configurations with multiple entities.
>
> Regards,
> Gora
>


Re: Indexing directories and files in a File System. (Fetched: 2, Processed: 0)

2013-03-05 Thread Syao Work
And if I need to index file name, path, size and/or mime?

On Tue, Mar 5, 2013 at 2:45 PM, Gora Mohanty  wrote:

> On 5 March 2013 15:08, Syao Work  wrote:
> > Hello,
> >
> > I am trying to index some FS folder tree.
> > Spent 2 days finding what could be the problem - got nothing :) There are
> > not so much examples on indexing File System.
> > In the logs I cant find any exceptions why it does not process the info
> > Data import configuration and debug response are attached
> [...]
>
> Please look more closely at the sample data configuration file at
> http://wiki.apache.org/solr/DataImportHandler#FileListEntityProcessor
> You need to use something like XPathEntityProcessor to define
> entities for indexing. Other entity processors, such as
> PlainTextEntityProcessor,
> can instead be used if you are not using XML files. Also, make sure
> that the field definitions in your schema.xml match the field names
> here.
>
> Regards,
> Gora
>


Indexing directories and files in a File System. (Fetched: 2, Processed: 0)

2013-03-05 Thread Syao Work
Hello,

I am trying to index some FS folder tree.
Spent 2 days finding what could be the problem - got nothing :) There are
not so much examples on indexing File System.
In the logs I cant find any exceptions why it does not process the info
Data import configuration and debug response are attached


Using:
1. solr web admin tool,
2. Java version "1.7.0_09-icedtea"
   OpenJDK Runtime Environment (fedora-2.3.7.0.fc17-x86_64)
   OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Thank you for your time,
Ro

P.S. Excuse my bad English, I am not a native English speaker.

 
 
	 
	

		
		
		 
		
		
		
		
 



import-debug-response.json
Description: application/json