Closed xpersonas closed 6 years ago
I've finally managed to at least see why I'm getting no results. I looked at a select request from SOLR and all that I have is...
http://127.0.0.1:30000/solr/select returns....
<response>
<result name="response" numFound="20" start="0">
<doc>
<str name="id">post_1</str>
<long name="_version_">1543672402808930304</long>
<date name="timestamp">2016-08-25T21:32:03.433Z</date>
</doc>
...
So I guess my solr index is not populating correctly. Though I'm not sure and have no idea why.
But this works as a proof of concept I guess...
$query->addSearchTerm('id', 'post_1');
Sorry I'm so green with this. But I'm trying to work my way through it.
Run solr:index:populate
to synchronize your DB and Solr.
Yes I did. I can clear it and populate it. But if I look at the index through the SOLR admin at /solr/select all I see is this...
<response>
<result name="response" numFound="20" start="0">
<doc>
<str name="id">post_1</str>
<long name="_version_">1543672402808930304</long>
<date name="timestamp">2016-08-25T21:32:03.433Z</date>
</doc>
...
I can search "post_1" and get the result. But I can't search anything like a title or entity field.
what does a complete post-document look like? Your example contains only the fields id
and timestamp
, a title
field is completely missing.
Right. That's the problem, and that's the hard part for me to debug. Here's what it looks like when I run the solr:scheme:show command:
Clearly I should have a title and description in the index.
But when I look at /solr/select in the Solr admin interface, I only see id and timestamp. I'm trying to figure out how to work through this issue from here.
If I simply get the solr.client and getResult(), I can return all of my post entities. But adding any kind of search to the query returns nothing. I've been trying every style and example I can find in your doc. Can you think of anything or help in any way to help me understand why I seem to have a full SOLR index, but can't actually search for any terms?
Returns All Posts:
Returns Nothing:
Additional Details: