Thanks for looking at it.

Id is usually going to be as follows:

"some.domain.name_SOMELONGSHA1HASH:/FileName.ext/somechars/1"

I indexed it so I could search for the domain name or the hash without storing 
it a second time. I'll convert to a string and see if this fixes the problem.

On Nov 8, 2012, at 8:45 AM, Erick Erickson wrote:

> Hmmm, I tried this with a 2 shard cluster and it works just fine, using
> your schema, solrconfig and query so I'm puzzled. What happens when you
> look at your cluster with the admin page? When you dive into collection1,
> does it show any documents?
> 
> Also, look at admin/schema-browser and look at the actual fields, to see if
> there's any data indexed.
> 
> 
> One thing though, I'd _seriously_ consider making the id a simple "string"
> type. It's possible that you're having some sort of wonkiness as a result
> of tokenizing your <uniqueKey>. I know of no _specific_ issues here, but it
> makes me really uneasy to see that your id field is tokenized in your
> schema given that Solr pretty much assumes that <uniqueKey> is a single
> token/document. There is some slight evidence for this in that your
> numfound is 6 but the data isn't being echoed (although it is for me), but
> that's just guessing.
> 
> Best
> Erick
> 
> P.S. If you're still stumped, can you also post the docs you're indexing?
> Or at least their IDs so I can see what happens then?
> 
> 
> 
> On Wed, Nov 7, 2012 at 4:20 PM, Jeff Rhines <sen...@gmail.com> wrote:
> 
>> I have a cluster of 6 shards of Solr 4.0.0 deployed, one machine each,
>> with no replicas, and another single machine running a zookeeper ensemble
>> of 5. Using python sunburnt, I submit six documents with separate ids and
>> populated text fields and commit them. No errors are reported. When I
>> search ( /solr/collection1/select?q=*%3A*&fl=id&wt=json&indent=true ), I
>> see no results, but numFound 6. I'm sure I've misconfigured something, and
>> I'm hoping more experienced folk can see what it is. If you have any
>> troubleshooting tips, I'll try anything at this point.
>> 
>> Thanks,
>> Jeff
>> 
>> Results:
>> {
>>  "responseHeader":{
>>    "status":0,
>>    "QTime":52},
>>  "response":{"numFound":6,"start":0,"maxScore":1.0,"docs":[]
>>  }}
>> 
>> 
>> My schema.xml is very simple:
>> 
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <schema name="example" version="1.5">
>>  <types>
>>    <fieldType name="string" class="solr.StrField" sortMissingLast="true"
>> />
>>    <fieldType name="text_general" class="solr.TextField"
>> positionIncrementGap="100">
>>      <analyzer type="index">
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.StopFilterFactory" ignoreCase="true"
>> words="stopwords.txt" enablePositionIncrements="true" />
>>        <filter class="solr.LowerCaseFilterFactory"/>
>>      </analyzer>
>>      <analyzer type="query">
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.StopFilterFactory" ignoreCase="true"
>> words="stopwords.txt" enablePositionIncrements="true" />
>>        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>> ignoreCase="true" expand="true"/>
>>        <filter class="solr.LowerCaseFilterFactory"/>
>>      </analyzer>
>>    </fieldType>
>>    <fieldType name="alphanum" class="solr.TextField">
>>      <analyzer>
>>        <tokenizer class="solr.PatternTokenizerFactory"
>> pattern="[^a-zA-Z0-9]"/>
>>        <filter class="solr.LowerCaseFilterFactory"/>
>>      </analyzer>
>>    </fieldType>
>>    <fieldType name="long" class="solr.TrieLongField" precisionStep="0"
>> positionIncrementGap="0"/>
>> </types>
>> <fields>
>>   <field name="id" type="alphanum" indexed="true" stored="true"
>> required="true"/>
>>   <field name="text" type="text_general" indexed="true" stored="true"
>> required="true"/>
>>   <field name="_version_" type="long" indexed="true" stored="true"/>
>> </fields>
>> <uniqueKey>id</uniqueKey>
>> </schema>
>> 
>> As is my solrconfig.xml:
>> 
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <config>
>>  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
>>  <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
>>  <lib dir="../../../dist/" regex="apache-solr-cell-\d.*\.jar" />
>>  <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
>>  <lib dir="../../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
>>  <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
>>  <lib dir="../../../dist/" regex="apache-solr-langid-\d.*\.jar" />
>>  <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
>>  <lib dir="../../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
>>  <dataDir>${solr.data.dir:}</dataDir>
>>  <directoryFactory name="DirectoryFactory"
>> class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
>>  <updateHandler class="solr.DirectUpdateHandler2">
>>    <updateLog>
>>      <str name="dir">${solr.data.dir:}</str>
>>    </updateLog>
>>  </updateHandler>
>>  <requestHandler name="/select" class="solr.SearchHandler">
>>  </requestHandler>
>>  <requestHandler name="/update" class="solr.UpdateRequestHandler">
>>  </requestHandler>
>>  <requestHandler name="/get" class="solr.RealTimeGetHandler">
>>    <lst name="defaults">
>>      <str name="omitHeader">true</str>
>>   </lst>
>>  </requestHandler>
>>  <requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
>> </config>
>> 
>> 

Reply via email to