You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Deepak Agarwal <da...@gmail.com> on 2012/08/22 09:29:18 UTC
Re: Form Field show information from different entities
Hello Robert,
I want to use the response of the solr result in ftl . I can see that it is
easily doable with velocity. Any idea how can we do it with ftl (freemarker)
On Tue, Jul 31, 2012 at 2:55 AM, Robert G. <ga...@mercon24.de> wrote:
> Its sth how Solr names a function.
> I just named it CategoryFacet, cause I show it in my category, but it is
> like a product filter.
>
>
> example:
> product 1 productspecification: resolution = XGA and size = 19"
> product 2 productspecification: resolution = WXGA and size = 20"
> product 3 productspecification: resolution = SXGA and size = 24"
> product 4 productspecification: resolution = SXGA and size = 17"
>
> Now in Solr the Facet is: "Resoultion" and the FacetValue is the value
> (XGA,
> WXGA etc.).
>
> Now i can do a filter like:
> *resulotion *
> XGA (1)
> WXGA (1)
> SXGA (2)
>
> *size*
> 17" (1)
> 19" (1)
> 20" (1)
> 24" (1)
> The (...) tells how many products are found.
> when I now i.ex. click on SXGA this changes to:
>
> resolution (just the headline)
> SXGA (2)
> *size*
> 17" (1)
> 24" (1)
>
> With that I can drill down my search results just with easy solr
> querys...hope I explained it well (difficult with just a few sentences)
>
>
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Form-Field-show-information-from-different-entities-tp4635391p4635395.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> --
> Thanks,
> Deepak Agarwal,
>
> Paxcel Technologies Pvt Ltd.
> Hartron Complex, Sector 18, Gurgaon, India.
> E-Mail: deepak.agarwal@paxcel.net
> Mobile: +91 9910322604
>
>
Re: Form Field show information from different entities
Posted by "Robert G." <ga...@mercon24.de>.
exactly that is my option for SEO, but i have not realized yet.
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Form-Field-show-information-from-different-entities-tp4635391p4635889.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Form Field show information from different entities
Posted by Deepak Agarwal <da...@gmail.com>.
Only problem with ajax I see is SEO. Normally, I would like all the results
to be cached by search engines. what is your opinion for search engine
optimization here?
On Wed, Aug 22, 2012 at 1:11 PM, Robert G. <ga...@mercon24.de> wrote:
> Hey :)
>
> I did it with JS/Ajax, if you want to send the complete result from server
> side, than I would solrJ (java API for Solr), and send the results to FTL
> or
> groovy--> ftl. Than you can enumerate these results f.ex. with <list>-Tag
> in
> ftl to show them on the page. The solrJ methods are really easy i.ex.:
>
> /
> //open the connection to solr
> CommonsHttpSolrServer solr = new
> CommonsHttpSolrServer("http://localhost:8983/solr");
>
> //set the query parameter set
> ModifiableSolrParams params = new ModifiableSolrParams();
> params.set("q", "cat:electronics");
> params.set("defType", "edismax");
> params.set("start", "0");
>
> //send the query parameter
> QueryResponse response = solr.query(params);
>
> //get results
> SolrDocumentList results = response.getResults();
>
> //i.ex. print the results
> for (int i = 0; i < results.size(); ++i) {
> System.out.println(results.get(i));
> }/
>
> Kindly
>
>
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Form-Field-show-information-from-different-entities-tp4635391p4635879.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> --
> Thanks,
> Deepak Agarwal,
>
> Paxcel Technologies Pvt Ltd.
> Hartron Complex, Sector 18, Gurgaon, India.
> E-Mail: deepak.agarwal@paxcel.net
> Mobile: +91 9910322604
>
>
Re: Form Field show information from different entities
Posted by "Robert G." <ga...@mercon24.de>.
Hey :)
I did it with JS/Ajax, if you want to send the complete result from server
side, than I would solrJ (java API for Solr), and send the results to FTL or
groovy--> ftl. Than you can enumerate these results f.ex. with <list>-Tag in
ftl to show them on the page. The solrJ methods are really easy i.ex.:
/
//open the connection to solr
CommonsHttpSolrServer solr = new
CommonsHttpSolrServer("http://localhost:8983/solr");
//set the query parameter set
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("q", "cat:electronics");
params.set("defType", "edismax");
params.set("start", "0");
//send the query parameter
QueryResponse response = solr.query(params);
//get results
SolrDocumentList results = response.getResults();
//i.ex. print the results
for (int i = 0; i < results.size(); ++i) {
System.out.println(results.get(i));
}/
Kindly
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Form-Field-show-information-from-different-entities-tp4635391p4635879.html
Sent from the OFBiz - User mailing list archive at Nabble.com.