Needs review
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
More Like This
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2013 at 08:27 UTC
Updated:
17 Oct 2013 at 09:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
soulfroysSame here (6.x-3.x-dev) :-(
Comment #2
nick_vhSeems to be working fine for me? Can you try with latest dev? Did you index your content already?
Comment #3
pwolanin commentedcan't reproduce this - can you add a screen shot?
Note that the list of fields comes form the index.
Comment #4
Growiel commentedMy content in indeed indexed. I just re-indexed it with the latest dev (to fix issue #1957070: "Solr search index will be rebuilt." message appears at the top of every view. (Even when index has been completely rebuilt.)) :
Here's a screenshot from the "More Like This" block configuration page :
As you can see, I can't select any fields.
And finally, when I submit the form, I have the following error, as expected :
Comment #5
pwolanin commentedRight, so you are not getting the field list from the index . This admin page actually makes a request to Solr if the result is not in the cache.
Check you logs for error messages.
Comment #6
soulfroysMy reports...
I'm using Solr 4.2.1 (Jetty) in all my tests:
Test 1: Drupal 7.21 + apachesolr 1.x-dev (last)
Test 2: Drupal 6.26 + apachesolr 6.x-3.x-dev (last, with this patch from #1550964: Support Solr 4.0 schema)
- 1 error in Solr log, but related to "i18n" (image).
- In both cases, no errors in Drupal log and I had the same result as @Growiel.
Comment #7
Growiel commentedI don't have anything in the logs, neither in Apache logs, Drupal reports or Solr logs.
However, I went ahead and searched the cause of the problem and located it :
The faulty part is the $field->schema{4}.
I var_dumped my fields and V only appears in 5th position :
string(7) "content" string(16) "ITS--V----------"
string(5) "label" string(16) "ITS--V--O-------"
string(10) "path_alias" string(16) "ITS--V--O-------"
string(14) "taxonomy_names" string(16) "IT--MV--O-------"
string(15) "tm_vid_10_names" string(16) "ITS-MV----------"
and so on.
This also explains why there's nothing in the logs : Solr does return something, it's the php part that ends up returning an empty array.
I don't know Solr well enough, but might this be due to the way Solr 4.x works as opposed to 3.x / 1.4 ?
Is this due to my own implementation (since I'm not the only one having the problem, I doubt it) ?
Hope that helps !
Comment #8
Growiel commentedComment #9
Growiel commentedAny update on this ? Do you want me to submit a patch changing 4 to 5 ?
Comment #10
justluvgod commentedI was experiencing the same issue.
configuration:
- Drupal 7.21
- Apache SOLR integration - 7.x-1.2
- SOLR 3.6.2
I made the change you suggested (changing 4 to 5) and now the field boxes appear. Thanks for your help.
For anyone who wants to implement this update, the document of reference is apachesolr_search.module located in the apachesolr module.
Comment #11
nick_vhSo this is a difference between solr 3 and 4? We should use the getSolrVersion function to see how we react on the different outputs
Comment #12
Growiel commentedDoesn't looks like it since I use Solr4 and justluvgod is using Solr3.
Comment #13
Greg Varga commentedI can confirm that changing
if ($field->schema{4} == 'V') {to
if ($field->schema{5} == 'V') {in apachesolr_search_mlt_get_fields() does work for Solr 4. (Module: 7.x-1.2)
I agree, Solr version has to be checked in this function.
Comment #14
pwolanin commentedIt would seem the position is not significant, just the letter?
Solr 3.6.2 has this key, which indicates each letter is unique:
Comment #15
jrreid commentedPatch in #14 works for me (Solr 4.3.0)
Comment #16
pwolanin commentedfixed in 7 and 6.x-3.x
may need to be ported to 6.x-1.x
Comment #17
stephenplatz commentedSame issue, using 7.x-1.3 and Solr 4.3.1. Patch #14 works.
Comment #18
Khalilou commentedSame issue, using 7.x-1.3 and Solr 4.3.1. Patch #14 works.
Comment #19
pwolanin commentedThis is in the latest release - please upgrade.
Comment #20
venky123 commentedI am using upgraded version of drupal and solr-4.4.0
But the problem still persists in windows system.
Its("FIELDS FOR FINDING RELATED CONTENT") working fine in Linux system.