Thanks Suat,

With your help I could implement the support to go one level deeper.

The corresponding webdav class is here:

http://svn.apache.org/viewvc/incubator/stanbol/branches/ontonet-showcase/featured-vfolders/src/main/java/org/apache/stanbol/contenthub/vfolders/CountResource.java?view=log

So one can now mount the webdavshare, go into the category (e.g. places)
select an entry (e.g. Switzerland). I don't know how to get the next level
which should be
- the matching content items
- and again the categories as in the root folder but only for categories
that contain entry that help reducing the matching set (to a proper but
non-empty subset)

I think webdav access should be identical to the web access to faceted
search with the exception that one can only remove filters in the inverse
order of adding them. The idea is to have a simple demo of the webdav
capabilities so that more virtual folders can be added providing a user
friendly way to access stanbol.

Another issue is that one can start featuredSearch only with a full-text
query, for webdav one should be browsing the whole set of content items,
but I think searching for "a*" is good enough to get started.

To install the current version you need to check out and install on your
stanbol instance:
-
http://svn.apache.org/repos/asf/incubator/stanbol/branches/ontonet-showcase/webdav/
-
http://svn.apache.org/repos/asf/incubator/stanbol/branches/ontonet-showcase/featured-vfolders/

After that you can mount http://localhost:8080/vfolders/ with webdav.

Would be great if you could help me getting one level deeper. As it is only
a subset of the functionality accessible with the webbrowser I hope this
code can be accessed, and that this can abstract away the assembling of
query string. For now I see now need for range-queries with the webdav
access.

Cheers,
Reto


On Thu, Apr 5, 2012 at 2:17 PM, Suat Gonul <[email protected]> wrote:

> Hi Reto,
>
> You can use the featured search by constructing a SolrQuery using the
> facet names and values as in the following example:
>
> SolrQuery query = new SolrQuery();
> query.setQuery("a*");
> query.addFilterQuery(<facetName> + ":"+
> ClientUtils.escapeQueryChars(<facetValue>));
> featuredSearch.search(query);
>
>
> You can obtain facet values by:
>
> for (Count count : facetResult.getFacetField().getValues()) {
>  String facetValue = count.getName();
>  long documentCount = count.getCount();
> }
>
>
> Based on the types of results facets e.g int, double, date, etc. you can
> write range queries. Type of a facet can be obtained by:
>
> facetResult.getType();
>
>
> You can have a look at solr query syntax for range queries at [1].
>
> Best,
> Suat
>
> [1] http://wiki.apache.org/solr/SolrQuerySyntax
>
>
> On 04/05/2012 01:14 PM, Reto Bachmann-Gmür wrote:
> > Hello
> >
> > I'm trying to programmatically access the facetted browsing features. I
> got
> > the first step, getting the top level categories with:
> >
> >             SearchResult searchResult = featuredSearch.search("a*");
> >             List<FacetResult> facetResults = searchResult.getFacets();
> >             for (FacetResult fr : facetResults) {
> >                 final String name = fr.getFacetField().getName();
> >                 System.out.println("name: "+name);
> > }
> >
> > How do I get the faceted search entries in the enumerated categories, and
> > how do I apply such an entry, how do I get the matching content items?
> >
> > Cheers,
> > Reto
> >
>
>

Reply via email to