Hi all,

i found a nice post about how to use this module in Drupal 6. but it is not the case in Drupal 7 where there is no search score and search snippet for fields, i am not sure how to set the search box in filter.

anyone could provide any sources about using this module in D7.
Thanks a lot.

Regards,
Kit

Comments

BarisW’s picture

Same here. I'm missing relations, arguments, score, snippet.. Any help is welcome!

jpargana’s picture

I have the same issue.

melvix’s picture

Subscribing.

Ingmar’s picture

I have no clue either.

118218’s picture

Please help us!! How can I put a search field in views for Drupal 7

Fixdit’s picture

Basic support here is fundamental as nobody seems to be able to get this module to work in Drupal 7?

becw’s picture

Status: Active » Postponed (maintainer needs more info)

I can get this module to working with the "default" Apache Solr environment in Drupal 7 if I apply this patch: #1408192: Add apachesolr.interface.inc to the .info file (patch).

becw’s picture

Status: Postponed (maintainer needs more info) » Active
brandy.brown’s picture

Priority: Normal » Major

Right, but I'm not even sure what that patch fixes? There has to be some sort of documentation on how to use this module -- how to make changes to the "default" environment. This is kind of imperative to being able to use the module.

becw’s picture

Priority: Major » Normal

The patch mentioned in #7 allows the apachesolr_views module to run; it has been committed, so the 7.x-1.x-dev version of the apachesolr_views module now works with the 7.x-1.x-dev version of apachesolr.

Once the module is running, it works very much like it worked in Drupal 6, though the Views UI has changed. Editing the apachesolr "default" environment is done through the apachesolr module; apachesolr_views simply provides views integration for the default environment.

I have another patch in this queue to provide Views integration for apachesolr environments other than the default: #1408500: Views of non-default Apache Solr "environments" (patch)

brandy.brown’s picture

Ok. I am running a really old version of Drupal core, I am going to upgrade and see if this helps me out. Thanks!

brandy.brown’s picture

Ok I have updated to Drupal 7.12. I am reinstalling this module to see if my problems are solved.

jpargana’s picture

Can't get it work. I updated both modules and can't get information described in #1.
It is need anything else?

becw’s picture

This module is usable in a very basic sense in Drupal 7. To get it running:

  1. Use at least version 7.x-1.0-beta16 of the Apache Solr module
  2. Enable the apachesolr and apachesolr_search modules (both are included when you download the Apache Solr module)
  3. Configure a default Solr environment at admin/config/search/apachesolr/settings
  4. Enable the apachesolr_views module

The order of these steps is important: you must have a working Solr environment configured before enabling apachesolr_views (#1409870: Undeclared dependency on apachesolr_search (patch) fixes this issue). These steps will allow you to create views of fields from your default Solr environment, with basic exact-match filters.

The following features are not yet implemented in the Drupal 7 version of this module:

I have patches for most of these issues, and am working on posting them in this queue.

becw’s picture

As noted in #1, views relationships, views arguments, and Solr highlighting/excerpts are also missing.

  • Views relationships weren't available in the Drupal 6 version of this module, and I suspect they don't make sense for the Drupal 7 version, either, because of the way Solr is structured (ie, it's not a relational database), and because this module deals with any kind of data stored in Solr--not just Drupal data.
  • Views arguments can and should be reimplemented. They were present in Drupal 6. This needs a new issue.
  • Solr highlighting/excerpts and search scores can and should be reimplemented, and this needs a new issue too.
steve.neill’s picture

Subscribing.

* Sorting does not appear to be working.
* Contextual filters seems like a serious omission.

Any help getting these 2 basic functions to work would be greatly appreciated.

nyleve101’s picture

ykyuen I found some documentation here in case anyone needs it https://getpantheon.atlassian.net/wiki/display/PANTHEON/Searching+with+A...

liquidcms’s picture

don't see any part of this working; but most likely just don't know the trick.

i sort of figured as a bare minimum there would be a Search Terms filter equivalent. but i don't see this or anything else that would indicate this module is doing anything.

ygerasimov’s picture

Module has been developed a lot lately. So I recommend to take a look at it once again and please open new issues with questions you might have.

But you are completely right -- we need nice documentation.

eme’s picture

Well, still it lacks :
- Most important : score (without it, hard to use this great module).
- Snipped as well.

ygerasimov’s picture

Nice suggestion.
I have created followup issues for score and snippet:
#1632200: Snippet field
#1632202: Score field

ygerasimov’s picture

Both snippet and score fields added.

acidpotato’s picture

I think getting Facets going in D7 is huge. What I love about this module is I can create a table of fields to show Solr results. I actually used the custom module to let Solr index Text Fields so they can be shown seperately.

For sometime I have been trying to get the facets goin in D7 but no luck. I have not used D6 version so I dont know how to use them. For example, if I have enabled facets (thanks Facet API) in Solr settings for Taxonomy, what settings do I have to use in the Contextual Filter area?

So far, I select Apache Solr: taxonomy_names. I am lost after that. What value goes in "WHEN THE FILTER IN NOT IN THE URL" area?

To use a pretty simple example - Custom Content Type - Juice Cocktail. Taxonomy Vocabulary - Fruit.
Some Juice Cocktails (nodes) are for example, Hawaiian Mojo, Cape Cod Crush, California Cooler and Piedmont Punch. Each Juice Cocktail has a combination of various terms from Vocabulary - Fruit: Mango, Papaya, Orange, Banana, etc.

Now to get back to the view, I select certain fields including Apache Solr: Content in my display and want to use facets. What options should be selected in Contextual Filter: Apache Solr: taxonomy_names?

So in "WHEN THE FILTER IN NOT IN THE URL" section - would it be "Provide default value"? If yes, what item should be selected? If Fixed value be selected, what would go in there? The name of the Vocabulary "Fruit" or Individual Terms that should be added so "Mango, Banana, Papaya, Orange, Banana"?

Sorry for this weird example but just wanted to get a very specific answer to a very specific question.

liquidcms’s picture

just tried latest and i think the trick is that you need to create a 'Apache Solr localhost server' (note localhost server is likely supposed to be the name you give your solr server; but seems to be hard coded to 'localhost server'). the downside to this is that you have very little control of what is added in your view - no fields, sorts, etc... sort of defeats the purpose i think of using Views for search.

time to see if searchapi/solr is a working combination as i don't think this module is quite ready.

liquidcms’s picture

hmm.. ok, very odd.. i refreshed the view and now many more fields available (and the view type has changed to match the solr server i set up)..

liquidcms’s picture

Category: support » bug
Priority: Normal » Major

seems to return results now but major omissions still seem to be:

- no search terms filter (perhaps i am missing something here as i don't see this module being of any use without this)
- no filter or sort for score (again would have to suggest this module is not functional without abilty to sort on score)

acidpotato’s picture

Ok got the Taxonomy facets working. The setting on Contextual Filters for Taxnomy Terms should be left to default and of course, follow all the steps listed in http://www.acquia.com/blog/views-3-apache-solr-acquia-drupal-future-search

jseagroves’s picture

Still looking for a good tutorial also. I have a few Solrs I would love to put Drupal as the front end. Using the lastest release and also Drupal 7.

miroslavbanov’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#2189721: Improve D7 documentation for Apachesolr Views