lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeetendra Gangele <gangele...@gmail.com>
Subject Re: Need help in velocity search UI
Date Tue, 02 Jun 2015 11:58:25 GMT
Hey Michal thanks for your reply.

Actually I am beginner I am listing below steps to perform.
1. add entry in query.vm  add hidden field with name 'fq'
2. now through js append in this field

My problem is ,facet_fields.vm is another file how can I get 'fq' access
this in another file?

Can you help me in writing sequence of  steps to make it work?


On 2 June 2015 at 17:01, Michał B. . <m.bienkowski@gmail.com> wrote:

> It's 'Boost by Price' field in default velocity template. You can find it
> in query.vm.
>
> R.
> Michał
>
> 2015-06-02 13:28 GMT+02:00 Jeetendra Gangele <gangele397@gmail.com>:
>
> > what is bf field and where can I find?
> >
> > On 2 June 2015 at 15:42, Michał B. . <m.bienkowski@gmail.com> wrote:
> >
> > > HI,
> > >
> > > Look how bf field is done. You could simply add hidden field with name
> > 'fq'
> > > and in JS append values to it.
> > >
> > > Regards,
> > > Michal
> > >
> > > 2015-06-02 11:17 GMT+02:00 Jeetendra Gangele <gangele397@gmail.com>:
> > >
> > > > Hi Michael
> > > >
> > > > Thanks for your reply. I got this is an macro.
> > > >
> > > > I am trying to modify the facet_fields.vm. how it works is like for
> > each
> > > $
> > > > field.name, $facet.name it gives the result.
> > > >
> > > > But now what I want is I want user to select multiple facets from
> > fields
> > > > and once user hit the filter button which I provided below I need to
> > send
> > > > all the select fields with selected facets? how can I do this .
> > > > since url_for_facet_filter is executed server side how can I pass all
> > the
> > > > selected facets of the fields, you can have a look at the UI below
> > > >
> > > > http://54.146.195.106:8080/solr/collection1/browse
> > > >
> > > >
> > > > Also below is my facet_fields.vm source code. please help me how can
> I
> > > > selected things to url_for_facet_filter
> > > >
> > > > #**
> > > >  *  Display facets based on field values
> > > >  *  e.g.: fields specified by &facet.field=
> > > >  *#
> > > >
> > > > #if($response.facetFields)
> > > >   <h2 #annTitle("Facets generated by adding &facet.field= to the
> > > request")>
> > > >     Filters
> > > >   </h2>
> > > >   #foreach($field in $response.facetFields)
> > > >     ## Hide facets without value
> > > >     #if($field.values.size() > 0)
> > > >       <span class="facet-field">$field.name</span>
> > > >       <ul>
> > > >         #foreach($facet in $field.values)
> > > >           <li>
> > > >                 <span class="showhide">#if($facet.name!=$null)$
> > > > facet.name#else<em>missing</em>#end($facet.count)</span>
> > > >             <div class="showhidecontainer">
> > > >                 <select name="$facet.name" class="filter $field.name
> ">
> > > >                       <option value="-1" selected>select</option>
> > > >                         <option value="1">Yes</option>
> > > >                       <option value="0">No</option>
> > > >               </select>
> > > >             </div>
> > > >           </li>
> > > >         #end
> > > >       </ul>
> > > >     #end  ## end if > 0
> > > >   #end    ## end for each facet field
> > > > #end      ## end if response has facet fields
> > > > <input type="button" value="filter" id="filterme"/>
> > > >
> > > > <script>
> > > > function filter() {
> > > > var topicsYes = [], topicsNo = [], semsYes = [], semsNo = [];
> > > > $(".filter").each(function() {
> > > >         //decide if its topic or sem
> > > >   var filter = $(this);
> > > >   var value = filter.val();
> > > >   if(filter.is(".topics")) {
> > > >         if(value === "1") topicsYes.push(filter.attr("name"));
> > > >     if(value === "0") topicsNo.push(filter.attr("name"));
> > > >   }
> > > >   else if(filter.is(".semTags")) {
> > > >     if(value === "1") semsYes.push(filter.attr("name"));
> > > >     if(value === "0") semsNo.push(filter.attr("name"));
> > > >   }
> > > >   else {
> > > >         console.log("something wrong");
> > > >   }
> > > > });
> > > > console.log(topicsYes, topicsNo, semsYes, semsNo);
> > > > }
> > > > $(function() {
> > > >         $("#filterme").click(filter);
> > > > $(".showhide").click(function() {
> > > >          $(this).next().slideToggle();
> > > >  });
> > > > });
> > > > </script>
> > > > -
> > > >
> > > >
> > > > On 2 June 2015 at 14:29, Michał B. . <m.bienkowski@gmail.com> wrote:
> > > >
> > > > > Look at the VM_global_library.vm file.
> > > > >
> > > > > Regards,
> > > > > Michal
> > > > >
> > > > > 2015-06-02 10:47 GMT+02:00 Jeetendra Gangele <gangele397@gmail.com
> >:
> > > > >
> > > > > > Hi All I was trying to modify the "facet_fields.vm" do anybody
> know
> > > > where
> > > > > > is the location of the function "url_for_facet_filter "?
> > > > > >
> > > > > > Also where will be log stored ?
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Michał Bieńkowski
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Michał Bieńkowski
> > >
> >
>
>
>
> --
> Michał Bieńkowski
>



-- 
Hi,

Find my attached resume. I have total around 7 years of work experience.
I worked for Amazon and Expedia in my previous assignments and currently I
am working with start- up technology company called Insideview in hyderabad.

Regards
Jeetendra

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message