Re: Chinese chars are not indexed ?
> I enter Chinese chars in the admin console for searching > matched documents, it does not return any though I have > uploaded some documents that has Chinese chars. Could it be URI Charset Config? http://wiki.apache.org/solr/SolrTomcat#URI_Charset_Config
Use of EmbeddedSolrServer
Hello, there is a recommendation (best practice) for the use of EmbeddedSolrServer? We use it, because we have in our application an EJB module with Message Drive Bean. Now, we create the EmbeddedSolrServer (http://wiki.apache.org/solr/Solrj # EmbeddedSolrServer) in a javax.servlet.ServletContextListener and keep the in a singletonwrapper Can we do it that way? Or should we create a whole pool of the servers? ( with Apache Commons Pool ) Can anyone give me any advice? Regards, Robert
Re: NGramFilterFactory usage
Hello, I got the problem solved. The issue was I was setting the wrong field name in the qf parameter of my request handler. Thanks. Regards, Indika On 27 June 2010 08:52, Indika Tantrigoda wrote: > Hello, > > > Applying the NGramFilterFactory for analyzer type="query" didnt solve the > issue. > From the examples I've seen it is only necesssary to have the > NGramFilterFactory at index time right ? > > Regards, > Indika > > On 27 June 2010 01:14, Indika Tantrigoda wrote: > >> Hi all, >> >> I've been working with Solr for while and the search components work as >> expected. >> Recently I've had the requirement to do searching on partial words and I >> setup the NGramFilterFactory. >> >> My schema.xml is as follows : >> >> > positionIncrementGap="100" stored="false" multiValued="true"> >> >> >> >> > maxGramSize="15"/> >> >> >> >> >> >> >> >> > multiValued="false"/> >> > multiValued="true"/> >> >> >> Furthermore I am using the dismax query hanlder and have set a boost on >> the nGram_text field. >> >> If I do a *:* on the Solr administration interface it shows the nGram_text >> field to be populated. >> However if I search for plan (Assume I indexed the word Plane) no results >> are shown. >> Is there any other configurations that needs to be done ? >> >> Thanks in advance, >> >> Regards, >> Indika >> > >
Re: example solr xml working fine but my own xml files not working
Most likely explanation: the Analyzer you're using at query time isn't matching what the Analyzer does at index time. For instance, the casing is different (or a myriad of other things). Or you're not actually querying on the field you think you are. Please post the definitions for the field from your schema file. Post the queries you're attempting. Post the results of your query with &debug=on. I agree it's probably something simple, but without seeing what you're doing it's hard to guess. You might take a look at: http://wiki.apache.org/solr/UsingMailingLists Best Erick On Sat, Jun 26, 2010 at 7:18 PM, codar wrote: > > To add to my last, when I query *:* I get the results I expect, but if I > query a term (ZS2) it doesn't find any matches. I must be missing > something simple. I'm new to solr, so it's possible I just don't > understand > how to query it. > > Jeff > > On Sat, Jun 26, 2010 at 6:42 PM, Jeff Kemble > wrote: > > > Thanks, Erik. > > > > I downloaded Luke and pointed it to my index. I can see the data I > indexed > > via Luke, but still can't query it through the admin console. I queried > for > > ZS1 and still got no results, but when I look at the index via Luke, > I > > see the document was indexed. I'm stumped. > > > > Jeff > > > > > > On Sat, Jun 26, 2010 at 2:54 PM, Erick Erickson [via Lucene] < > > ml-node+924591-989457010-302...@n3.nabble.com > > > > > > wrote: > > > >> The first place you should go for this type of question is the > >> solr admin page and look at what's actually in your index. > >> > >> A very handy tool for this is also Luke. Get a copy of it (google > >> Lucene Luke) and point it at your index and poke around > >> to see if what's actually in your index is what you expect. > >> > >> If that all doesn't help, post more information. Particularly > >> what query you're submitting that you expect to return > >> results. > >> > >> Also, try executing the query with &debugQuery=on, that may > >> give you some clues (also note that there's a checkbox on the > >> Admin page for debug info if you go to the "full interface" > >> > >> HTH > >> Erick > >> > >> On Sat, Jun 26, 2010 at 8:46 AM, codar <[hidden email]< > http://user/SendEmail.jtp?type=node&node=924591&i=0>> > >> wrote: > >> > >> > > >> > I'm struggling with this very same problem. I can index the example > >> files > >> > fine. When I try adding a custom file, it appears to index without > >> issue; > >> > but I get no search results via the admin console. I've also tried > >> > modifying one of the files (monitor.xml); it also did not update. I'm > >> > using > >> > solr 1.4.1 on a MAC. Any help would be greatly appreciated. > >> > > >> > I added these fields to the schema.xml > >> > stored="true" > >> > >> >multiValued="true" /> > >> > >> stored="true" > >> >multiValued="true" /> > >> > stored="true" > >> > >> >multiValued="true" /> > >> > > >> > Here's my custom xml: > >> > > >> > > >> >ZS1 > >> >ZS1 > >> >RW > >> >How to index Solr on the Mac > >> > > >> > > >> > I cd to the exampledocs dir and run: java -jar post.jar my_data.xml > >> > > >> > Here are the results: > >> > > >> > SimplePostTool: version 1.2 > >> > SimplePostTool: WARNING: Make sure your XML documents are encoded in > >> UTF-8, > >> > other encodings are not currently supported > >> > SimplePostTool: POSTing files to http://localhost:8983/solr/update.. > >> > SimplePostTool: POSTing file tr_single.xml > >> > SimplePostTool: COMMITting Solr index changes.. > >> > > >> > So, it appears to have indexed without issue, but yet when I search > for > >> the > >> > ZS1, I get not results. > >> > > >> > Thanks in advance > >> > > >> > > >> > -- > >> > View this message in context: > >> > > >> > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html > < > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html?by-user=t > > > >> > Sent from the Solr - User mailing list archive at Nabble.com. > >> > > >> > >> > >> -- > >> View message @ > >> > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924591.html > >> To unsubscribe from Re: example solr xml working fine but my own xml > files > >> not working, click here< (link removed) =>. > >> > >> > >> > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924880.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: example solr xml working fine but my own xml files not working
Thanks for the link to "how to post" - not sure how to interpret that. I already posted the fields definition from the schema, the query I'm trying to submit, and the results. I'm not sure what more I can post. I get 0 results, and when I turn debug on it doesn't provide anything meaningful. Please reread my other posts for the answers to your questions. -- View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926031.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: example solr xml working fine but my own xml files not working
What is the default search field? Is it "ALL" or did you change it? If it is "ALL" are you copying your data to ALL? Instead of searching for "*:*" does it show results if you search for "id:ZS1"? Binesh Gummadi On Sun, Jun 27, 2010 at 2:12 PM, codar wrote: > > Thanks for the link to "how to post" - not sure how to interpret that. I > already posted the fields definition from the schema, the query I'm trying > to submit, and the results. I'm not sure what more I can post. I get 0 > results, and when I turn debug on it doesn't provide anything meaningful. > Please reread my other posts for the answers to your questions. > -- > View this message in context: > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926031.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Wither field compresed="true" ?
I just noticed that field compression (e.g. compressed="true") is no longer in Solr, nor can I find why this was done. Can a committer offer an explanation? If the reason is that it eats up CPU, then I'd rather accept this tradeoff for a big-data yet small query volume use case. ~ David Smiley - Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book -- View this message in context: http://lucene.472066.n3.nabble.com/Wither-field-compresed-true-tp926288p926288.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: example solr xml working fine but my own xml files not working
Binesh, Great advice. Yes, it does show results when I search for id:ZS1, COL:RW, and TI:MAC, but strangely it does not show results when I try AD:ZS1 or AN:ZS1. Also, I'm not sure where to find the default field, so I'm fairly certain I didn't change it. I'm entering the querytext in the "Make a Query" section of the Solr Admin page (http://localhost:8983/solr/admin/). Here's the result of my query(id:ZS0001): 0 129 on 10 0 id:ZS1 2.2 ZS1 ZS1 RW How to index Solr on the Mac ZS1 I'm reposting the data I indexed and the field definitions: Here's the data: ZS1 ZS1 ZS1 RW How to index Solr on the Mac Here's the schema.xml definitions: Thanks again for all the help!! Jeff -- View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926340.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: example solr xml working fine but my own xml files not working
> Yes, it does show results when I search for id:ZS1, > COL:RW, and TI:MAC, > but strangely it does not show results when I try > AD:ZS1 or AN:ZS1. What is the output of q=AD:ZS1&debugQuery=on > Also, I'm not sure where to find the default field, so I'm > fairly certain I didn't change it. Default search field declaration is in schema.xml between tags. Can you paste field type definition of text?
Re: example solr xml working fine but my own xml files not working
Well, all I can say is that a fresh download of 1.4.1 and cutting and pasting your exact fields and putting them into my schema.xml, copying and pasting your exact document into a new document and indexing it (./post.jar eoe.xml) and then running any of the 4 queries you indicated works fine for me. Are you absolutely, positively sure that the only changes you made to your schema.xml file was adding those lines? Because my best guess is you made some "innocent" change there that wasn't so innocent. WordDelimiterFilter in the fieldType would be a good candidate. So, again, post the relevant fieldType definitions from your schema.xml file. That is, the definition for "text", i.e. blah blah blah And post the results of debugQuery=on. This is easily done from the admin page here: http://localhost:8983/solr/admin/form.jsp (it's the link to "full interface" from the admin page) and checking the "debug:enable" checkbox. Or get a fresh copy of the schema file and add your changes anew and try reindexing. HTH Erick On Sun, Jun 27, 2010 at 5:58 PM, Ahmet Arslan wrote: > > Yes, it does show results when I search for id:ZS1, > > COL:RW, and TI:MAC, > > but strangely it does not show results when I try > > AD:ZS1 or AN:ZS1. > > What is the output of q=AD:ZS1&debugQuery=on > > > Also, I'm not sure where to find the default field, so I'm > > fairly certain I didn't change it. > > Default search field declaration is in schema.xml between > >tags. > > Can you paste field type definition of text? > > >
Re: Chinese chars are not indexed ?
Hi, I am using the sample, not deploying Solr in Tomcat. Is there a place I can modify this setting ? thanks, canal From: Ahmet Arslan To: solr-user@lucene.apache.org Sent: Sun, June 27, 2010 4:47:15 PM Subject: Re: Chinese chars are not indexed ? > I enter Chinese chars in the admin console for searching > matched documents, it does not return any though I have > uploaded some documents that has Chinese chars. Could it be URI Charset Config? http://wiki.apache.org/solr/SolrTomcat#URI_Charset_Config
Re: example solr xml working fine but my own xml files not working
Jeff, It should be in schema.xml at the end of the file. Look for the following. all To copy your fields to the default search field you should have something like this. Once you do that you should be able to search for ZS1. As others suggested you should look at your index using Luke. That might give you a clue on whats happening. Solr analyzer is another great resource. http://localhost:8983/solr/admin/analysis.jsp?highlight=on. Make sure you select verbose check boxes and enter your fieldname(AD or AN), field value ZS1 and query value ZS1. See how it is indexed and queried in the output. Hope that helps. Good luck. Binesh Gummadi On Sun, Jun 27, 2010 at 5:37 PM, codar wrote: > > Binesh, > > Great advice. > > Yes, it does show results when I search for id:ZS1, COL:RW, and TI:MAC, > but strangely it does not show results when I try AD:ZS1 or AN:ZS1. > Also, I'm not sure where to find the default field, so I'm fairly certain I > didn't change it. I'm entering the querytext in the "Make a Query" > section > of the Solr Admin page (http://localhost:8983/solr/admin/). > > Here's the result of my query(id:ZS0001): > > > > > 0 > 129 > > on > 10 > > 0 > id:ZS1 > 2.2 > > > > > ZS1 > > ZS1 > RW > How to index Solr on the Mac > ZS1 > > > > > > I'm reposting the data I indexed and the field definitions: > > Here's the data: > >ZS1 >ZS1 > ZS1 > RW >How to index Solr on the Mac > > > Here's the schema.xml definitions: > >multiValued="true" /> > multiValued="true" /> >multiValued="true" /> >multiValued="true" /> > > Thanks again for all the help!! > > Jeff > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926340.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: questions about Solr shards
Otis, Belated thanks for your reply. >> 2. "The index could change between stages, e.g. a >> document that matched a >> query and was subsequently changed may no >> longer match but will still be >> retrieved." > 2. This describes the situation where, for instance, a > document with ID=10 is updated between the 2 calls > to the Solr instance/shard where that doc ID=10 lives. Can you explain why this happens? (I.e. does each query to the sharded index somehow involve 2 calls to each shard instance from the base instance?) -Babak On Thu, Jun 24, 2010 at 10:14 PM, Otis Gospodnetic wrote: > Hi Babak, > > 1. Yes, you are reading that correctly. > > 2. This describes the situation where, for instance, a document with ID=10 is > updated between the 2 calls to the Solr instance/shard where that doc ID=10 > lives. > > 3. Yup, orthogonal. You can have a master with multiple cores for sharded > and non-sharded indices and you can have a slave with cores that hold > complete indices or just their shards. > Otis > > Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch > Lucene ecosystem search :: http://search-lucene.com/ > > > > - Original Message >> From: Babak Farhang >> To: solr-user@lucene.apache.org >> Sent: Thu, June 24, 2010 6:32:54 PM >> Subject: questions about Solr shards >> >> Hi everyone, > > There are a couple of notes on the limitations of this >> approach at > >> target=_blank >http://wiki.apache.org/solr/DistributedSearch which I'm >> having trouble > understanding. > > 1. "When duplicate doc IDs are received, >> Solr chooses the first doc > and discards subsequent >> ones" > > "Received" here is from the perspective of the base Solr instance >> at > query time, right? I.e. if you inadvertently indexed 2 versions >> of > the document with the same unique ID but different contents to >> 2 > shards, then at query time, the "first" document (putting aside for > the >> moment what exactly "first" means) would win. Am I reading >> this > right? > > > 2. "The index could change between stages, e.g. a >> document that matched a > query and was subsequently changed may no >> longer match but will still be > retrieved." > > I have no idea what >> this second statement means. > > > And one other question about >> shards: > > 3. The examples I've seen documented do not illustrate >> sharded, > multicore setups; only sharded monolithic cores. I assume >> sharding > works with multicore as well (i.e. the two issues are >> orthogonal). Is > this right? > > > Any help on interpreting the >> above would be much appreciated. > > Thank you, > -Babak >
Re: SolrJ/EmbeddedSolrServer
On May 22, 2010, at 11:25am, Ryan McKinley wrote: accidentally hit send... Eache core can have the dataDir set explicitly. If you want to do this with solrj, you would need to manipulate the CoreDescriptor objects. I'm hoping somebody can clarify what's up with the CoreDescriptor class, since there's not much documentation. As far as I can tell, when you create a new SolrCore, it saves off the CoreDescriptor you pass in, and does nothing with it. The constructor for SolrCore also takes a datadir param, so I don't see how the CoreDescriptor's dataDir gets used during construction. And changing the CoreDescriptor's dataDir has no effect, since it's essentially a POJO. So how would one go about changing the dataDir for a core, in a multi- core setup? Thanks, -- Ken On Sat, May 22, 2010 at 2:24 PM, Ryan McKinley wrote: Check: http://wiki.apache.org/solr/CoreAdmin Unless I'm missing something, I think you should be able to sort what you need On Fri, May 21, 2010 at 7:55 PM, Ken Krugler wrote: I've got a situation where my data directory (a) needs to live elsewhere besides inside of Solr home, (b) moves to a different location when updating indexes, and (c) setting up a symlink from /data isn't a great option. So what's the best approach to making this work with SolrJ? The low-level solution seems to be - create my own SolrCore instance, where I specify the data directory - use that to update the CoreContainer - create a new EmbeddedSolrServer But recreating the EmbeddedSolrServer with each index update feels wrong, and I'd like to avoid mucking around with low-level SolrCore instantiation. Any other approaches? Thanks, -- Ken Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g
is there a "delete all" command in updateHandler?
I want to delete all index and rebuild index frequently. I can't delete the index files directly because I want to use replication
Re: SolrJ/EmbeddedSolrServer
On May 22, 2010, at 11:24am, Ryan McKinley wrote: Check: http://wiki.apache.org/solr/CoreAdmin Unless I'm missing something, I think you should be able to sort what you need If I'm using SolrJ, is there a programmatic way to force a reload of a core? This, of course, assumes that I'm able to programmatically change the location of the dataDir, which is another issue. Thanks, -- Ken On Fri, May 21, 2010 at 7:55 PM, Ken Krugler wrote: I've got a situation where my data directory (a) needs to live elsewhere besides inside of Solr home, (b) moves to a different location when updating indexes, and (c) setting up a symlink from /data isn't a great option. So what's the best approach to making this work with SolrJ? The low- level solution seems to be - create my own SolrCore instance, where I specify the data directory - use that to update the CoreContainer - create a new EmbeddedSolrServer But recreating the EmbeddedSolrServer with each index update feels wrong, and I'd like to avoid mucking around with low-level SolrCore instantiation. Any other approaches? Thanks, -- Ken Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g
Re: SolrJ/EmbeddedSolrServer
Answering my own question... I can use CoreContainer.reload("core name") to force a reload. I assume that if I've got an EmbeddedSolrServer running at the time I do this reload, everything will happen correctly under the covers. So now I just need to find out how to programmatically change settings for a core. -- Ken On May 22, 2010, at 11:24am, Ryan McKinley wrote: Check: http://wiki.apache.org/solr/CoreAdmin Unless I'm missing something, I think you should be able to sort what you need If I'm using SolrJ, is there a programmatic way to force a reload of a core? This, of course, assumes that I'm able to programmatically change the location of the dataDir, which is another issue. Thanks, -- Ken On Fri, May 21, 2010 at 7:55 PM, Ken Krugler wrote: I've got a situation where my data directory (a) needs to live elsewhere besides inside of Solr home, (b) moves to a different location when updating indexes, and (c) setting up a symlink from /data isn't a great option. So what's the best approach to making this work with SolrJ? The low- level solution seems to be - create my own SolrCore instance, where I specify the data directory - use that to update the CoreContainer - create a new EmbeddedSolrServer But recreating the EmbeddedSolrServer with each index update feels wrong, and I'd like to avoid mucking around with low-level SolrCore instantiation. Any other approaches? Thanks, -- Ken Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g
Re: SolrJ/EmbeddedSolrServer
Sort of answering my own question here too... It seems like I need to get the current core, and use that to instantiate a new SolrCore with the same exact config, other than the dataDir. The documentation for SolrCore()'s constructor says: "If a core with the same name already exists, it will be stopped and replaced by this one" But it's unclear to me whether this will do a graceful swap (like what I want) or a hard shutdown of the old core. Thanks, -- Ken On May 22, 2010, at 11:25am, Ryan McKinley wrote: accidentally hit send... Eache core can have the dataDir set explicitly. If you want to do this with solrj, you would need to manipulate the CoreDescriptor objects. I'm hoping somebody can clarify what's up with the CoreDescriptor class, since there's not much documentation. As far as I can tell, when you create a new SolrCore, it saves off the CoreDescriptor you pass in, and does nothing with it. The constructor for SolrCore also takes a datadir param, so I don't see how the CoreDescriptor's dataDir gets used during construction. And changing the CoreDescriptor's dataDir has no effect, since it's essentially a POJO. So how would one go about changing the dataDir for a core, in a multi- core setup? Thanks, -- Ken On Sat, May 22, 2010 at 2:24 PM, Ryan McKinley wrote: Check: http://wiki.apache.org/solr/CoreAdmin Unless I'm missing something, I think you should be able to sort what you need On Fri, May 21, 2010 at 7:55 PM, Ken Krugler wrote: I've got a situation where my data directory (a) needs to live elsewhere besides inside of Solr home, (b) moves to a different location when updating indexes, and (c) setting up a symlink from /data isn't a great option. So what's the best approach to making this work with SolrJ? The low-level solution seems to be - create my own SolrCore instance, where I specify the data directory - use that to update the CoreContainer - create a new EmbeddedSolrServer But recreating the EmbeddedSolrServer with each index update feels wrong, and I'd like to avoid mucking around with low-level SolrCore instantiation. Any other approaches? Thanks, -- Ken Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g Ken Krugler +1 530-210-6378 http://bixolabs.com e l a s t i c w e b m i n i n g
Re: Chinese chars are not indexed ?
> I am using the sample, not deploying Solr in Tomcat. Is > there a place I can modify this setting ? Ha, okey if you are using jetty with java -jar start.jar then it is okey. But for Chinese you need special tokenizer since Chinese is written without spaces between words. Or you can search with both leading and trailing star. q=*ChineseText* should return something.