Hi,
I am asking this question for the Apache Solr Module Developers and i wanted to know if any work has been done previously on this kind of work.
I wanted to create a content-type (which has several fields and solr query box is one of those fields) and when the node page is created a query should be made based on the input and the search-results should be displayed as a field rather than displaying them in the whole page. The appropriate facets should also be created on left or right side, when the page is created.
Just a simple example would be in this page (http://nick.dlib.vt.edu/drupal/?q=node/114#) where an implicit query is made and the results are shown as a part of a field. Other fields can also be present for the content-type. I wrote my own field module which queries Solr using (SolrPhpClient) and shows the results. This simple module does not use apache-solr module.
I would like to know how apache-solr module can be used to create something like this. So when the implicit query is made, results and facets should be shown.
I am new to drupal but i am learning to write custom code as per my requirements. I have worked with Solr for one year and i index my huge content remotely using my own scripts. I have changed the configuration files in the way it works for indexing drupal content and also my remote data.
I think this can be made possible using apachesolr module but i would like to have few inputs on how this can be done without much work. I can write custom code for this kind of work but i would like to use the api and apache solr hooks.
Please tell me what to do you think.
Sorry for a long post.
Many Thanks
Comments
Comment #1
cpliakas commentedHi kiran chitturi.
You might be able to leverage the apachesolr_do_query() API function, which will execute a Solr query and initialize the facet building stuff so you can display facets. To see how to build the query object, take a look at the Solr_Base_Query.php file. Regarding the field integration, that is definitely outside the scope of this module, however the API functions above should allow you to use this module instead of the SolrPhpClient library.
Taking a step back, though, why are you doing this as a field in a node? In other words, what is the node giving you that drove you to choose this architecture? There could be some other ways to accomplish what you are looking to do without having do a lot of (if any) coding.
Thanks,
Chris
Comment #2
kiranch@vt.edu commentedHi Chris,
Many Thanks for your reply. I have been waiting hear back from drupal community.
I will give you an example on why i want this as a field in a node,
I have started learning drupal for this project, and i have been working hard to learn how things work in drupal. I have not tried looking in to Search API Solr search, do you think it would be useful to play with ?
If you have any suggestions, i would like to know :)
Thanks again, for the response.
Sorry for the long post, i thought i could give more clear details of my work.
Comment #3
nick_vhIm not really sure what the real question is here? It does sound like you have an interesting project going on there :)
Can you clarify where you are still stuck?