Hi Nick,
I´m doing the drupal 7 port for this module.
The indexing is completed I did it using the hook hook_apachesolr_index_
document_build. Not sure what is the purpose of the other hook, the node hook is not called in the indexing process.
* I also changed the prepare_query function as follows:
From:
function apachesolr_ubercart_apachesolr_prepare_query(&$query)
To:
function apachesolr_ubercart_apachesolr_query_prepare(&$query) {
* For all the module I changed the fs_ to fss_ as the solr xml configuration files changed.
The next stuff to work in is the facets
I found this functions facet related
hook_apachesolr_facets() -> Seems to be the facet definition array but I didn't found the hook anywhere else can you please give me some directions?
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | apachesolr_ubercart.tar_.gz | 75.3 KB | julianmancera |
| #7 | 1402868-#7.patch | 23 KB | julianmancera |
| #6 | 1402868-#6.patch | 28.69 KB | julianmancera |
| #3 | apachesolr_ubercart.tar_.gz | 8.2 KB | julianmancera |
Comments
Comment #1
nick_vhCould you also already add a patch with what you have?
Comment #2
nick_vhIn the meantime I added a 7.x-1.x branch so we can start playing around
Comment #3
julianmancera commentedHi Nick,
Here is what I have done so far. Many code is been commented out as it throws php errors.
Julian Mancera
Comment #4
nick_vhHi, I made some work of this issue queue so all the patches in the queue were submitted and verified. Please make sure you work with the latest 6.x branch to backport all of these features :-)
Comment #5
nick_vhAlso I'd recommend you to make a patch. How to do this?
Go to the directory where you have cloned the module, and then do
git diff origin/6.x-1.x > /some/path/to/save/patches/1402868-#comment-number.patchComment #6
julianmancera commentedHi Nick,
Here is the starting patch for the drupal 7 port. Though there is an error that doesn´t allow me to finish it. It is the line number 248. I couldn't find a way to find the current query from the drupal static cache. Not sure why it doesn´t show up. Can you please take a look and give me a hand?
Thank you
Julian Mancera
Comment #7
julianmancera commentedNick,
Here is the patch so it works with the new facet api. I tried to find error for it to integrate to the slider module, it seems to be a missing array item in the facetapi module. Here is the code in facetapi.block.inc file line 78
Can you give me a hand on this problem with the facet definition?
Julian Mancera
Comment #8
nick_vhWould you be interested in being co-maintainer? For the Drupal 7 port?
Nick
Comment #9
julianmancera commentedHi Nick,
Yes let's do it.
Julian
Comment #10
julianmancera commentedNick,
There is one feature that I need to be implemented in the port. The product image indexing and the inclusion for the Apache sorl Views module. I have develop a views handler my self but I'm not sure how to include image style sizing options for the views creation interface.
Anyone have an idea on how to do it?
Regards,
Julian Mancera
Comment #11
julianmancera commentedHi Nick
Here is last version. For this we have the following additions
- Ubercart image added for apache solr views
- Add to cart button added for apache solr views
What's missing
- Facet Price slider to work with the slider module
- Testing the D6 features on the D7
Regards
Julian Mancera
Comment #12
julianmancera commentedNick,
For the apache solr views to work you need apply the following patches to the apache sorl view module
http://drupal.org/node/1428630
http://drupal.org/node/1425464
http://drupal.org/node/1428558
Regards,
Julian Mancera
Comment #13
julianmancera commentedHi Nick,
Any notice from webmasters?
Thank you
Julian
Comment #14
nick_vh@julianmancera : Check the issue in this project queue. It takes time it seems... :-)
Nick
Comment #15
zeezhao commentedPlease I have a question that relates to a comment on the home page that says:
"If you are using apachesolr and Ubercart of Drupal Commerce this can be replaced now if you are using fields. Use facetapi and use the widget of your choice to replicate this behavior. A recommended widget is Facet Slider"
- I tried the above approach but could not see any of the fields at where added to my product classes....
In any case, is this approach meant to be an atletnative to apachesolr_ubercart?
Comment #16
julianmancera commentedHi zeezhao,
Not sure if using the Drupal Commerce will put additional fields to a product sounds weird though, the above discussion was meant to port the apache sorl ubercart module and it's integration with apache solr views(so fields can be indexed and shown in views ui), so for example if you want to build a view for listing your products and them filter them by facets you will be able to do so.
Julian Mancera
Comment #17
julianmancera commentedHi Nick,
I found the piece of code where it is the problem for the slider. It is in the query_type_numeric_range.inc file line 31 of the apachesolr module.
For some reason the facet['map options'] variable is not set. I hacked it and it works for the ubercart sell price, so the error should be located where the numeric range facet is created.
Let me know your thoughts
Julian Mancera
Comment #18
nyleve101 commentedHi,
i can't see the patch for http://drupal.org/node/1425464 is that still needed?
Hope you're well
Eve
Comment #19
julianmancera commentedHi Nick,
I did the facet mapping definition but it doesn't solve the problem with the slider facet, can you please take a look? It is already commited to dev.
I strongly suppect that it has to do with the way the slider facet is stored in the database the facet db data states that the slider facet information is undefined.
Any ideas over this.
Regards,
Julian Mancera
Comment #20
julianmancera commentedHi
Here is the db record from the facetapi table
a:7:{s:8:"operator";s:3:"and";s:10:"hard_limit";s:2:"50";s:12:"dependencies";a:0:{}s:14:"facet_mincount";i:1;s:13:"facet_missing";i:0;s:7:"flatten";i:0;s:10:"query_type";s:13:"numeric_range";}
Regards,
Julian
Comment #21
Colin @ PCMarket commentedHas anyone managed to get the dev working?
After enabling this module, my ubercart related fields like sku and price etc still do not seem to be indexed.
Comment #22
julianmancera commentedHi PCMarket
Did you reindex all the content? Does the sell price shows in the sorl index report?
Julian Mancera
Comment #23
Colin @ PCMarket commentedHi Julian
Yes I have re-indexed all content, all of the usual fields and my custom fields of each content type are indexed, but non of the ubercart fields such as sell price, list price etc are showing in the solr index report. and as these are not indexed, these are not available as a facet block.
any ideas?
thanks
Colin
Comment #24
julianmancera commentedHi Colin,
Send the apache solr module version to make a test myself.
Regards,
Julian
Comment #25
Colin @ PCMarket commentedI am using Apache Solr module version 7.x-1.0-rc5
Comment #26
nyleve101 commentedHi,
I am also having the same issue. None of the ubercart price fields are being indexed. Also, when I add the ubercart image field to my views it only shows the file name e.g. test.png.
I'm using apachesolr 7.x-1.1 and Apache Solr Views 7.x-1.0-beta2.
Anyone else experiencing these issues?
Comment #27
nyleve101 commentedHi Julian,
any updates on making this compatible with the recent Apache Solr changes?
Hope you're well,
Evelyn
Comment #28
julianmancera commentedHi Evelyn,
Currently there is a bug with the apache solr module that doesn't allow to index the fields that are not included within the field api. That's why you will need to apply this patch to the apache solr
http://drupal.org/node/1595440
Please let me know if it solves it for you.
Julian
Comment #29
nyleve101 commentedHi Julian,
the patch doesn't work with the 7.x-1.1 version of apache solr.
Evelyn
Comment #30
rakun commentedI am using Apache Solr Search 7.x-1.7 and Apachesolr Ubercart Integration 7.x-1.x-dev (2013-Sep-30). I tried patch from http://drupal.org/node/1595440 and also tried instructions from the article https://www.drupal.org/node/1965932 but with no luck. None of the ubercart price fields are being indexed. Is there anybody that get this to work?