Changes between Version 8 and Version 9 of NarrowYourSearchWidget


Ignore:
Timestamp:
Sep 10, 2012, 1:53:56 AM (12 years ago)
Author:
fxp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NarrowYourSearchWidget

    v8 v9  
    4747== Proposal ==
    4848
     49=== Faceted search widgets ===
     50
     51TODO
    4952
    5053
     
    5255
    5356The facet configuration define which field in the index to use to compute the summary.
    54 The configuration is stored in WEB-INF/config-summary.xml. For each facet configure the following properties:
     57The configuration is stored in WEB-INF/config-summary.xml. For each facet configure an item with the following properties:
    5558 * name: the name of the facet (ie. the tag name in the XML response)
    5659 * plural: the plural for the name (ie. the parent tag of each facet values)
    5760 * indexKey: the name of the field in the index
    58  * sortBy: the ordering for the facet. Defaults is by count.
    59  * sortOrder: asc or desc. Defaults is descendant.
    60  * max: the number of values to be returned for the facet. Defaults is 10.
     61 * (optional) sortBy: the ordering for the facet. Defaults is by count.
     62 * (optional) sortOrder: asc or desc. Defaults is descendant.
     63 * (optional) max: the number of values to be returned for the facet. Defaults is 10.
     64
     65When an item is modified or added, the index MUST be rebuild.
    6166
    6267Configuration example:
     
    6873}}}                     
    6974
     75Facet configuration is loaded on startup. It could be reloaded from the administration panel using the reload configuration button.
    7076
    7177
    7278=== Facet response ===
    73 Current implementation produce (see xml.search service) :
     79
     80Facet summary is returned in the XML response. The response structure is the following:
    7481{{{
    7582<response>
    7683  <summary count="4797" type="local">
    7784    <keywords>
    78 <keyword count="1280" name="soil types"/>
    79 <keyword count="1003" name="geology"/>
    80 <keyword count="958" name="soils"/>
    81 <keyword count="894" name="soil classification"/>
    82 <keyword count="695" name="land use"/>
    83 <keyword count="609" name="topography"/>
    84 <keyword count="595" name="land suitability"/>
    85 <keyword count="550" name="land"/>
    86 <keyword count="508" name="physiography"/>
    87 <keyword count="507" name="crops"/>
    88 </keywords>
    89   <categories>
    90 <category count="165" name="datasets"/>
    91 <category count="2" name="interactiveresources"/>
    92 <category count="150" name="maps"/>
    93 </categories>
    94   <sources>
    95 <source count="4350" name="d5a5b43b-6e52-4ec6-94af-f95c6e4dac24"/>
    96 <source count="447" name="34475e9d-9b9e-48d1-b75c-08701c3a8f93"/>
    97 </sources>
    98 </summary>
    99 <metadata>
     85      <keyword count="1280" name="soil types"/>
     86      <keyword count="1003" name="geology"/>
     87      <keyword count="958" name="soils"/>
     88      <keyword count="894" name="soil classification"/>
     89      <keyword count="695" name="land use"/>
     90      <keyword count="609" name="topography"/>
     91      <keyword count="595" name="land suitability"/>
     92      <keyword count="550" name="land"/>
     93      <keyword count="508" name="physiography"/>
     94      <keyword count="507" name="crops"/>
     95    </keywords>
     96    <spatialRepresentationTypes>
     97      <spatialRepresentationType count="2641" name="grid"/>
     98      <spatialRepresentationType count="625" name="vector"/>
     99    </spatialRepresentationTypes>
     100  </summary>
     101  <metadata>
     102   ...
     103}}}
    100104
    101 }}}
     105The summaryOnly=true parameter return only the summary without records.
    102106
    103107
     
    113117  * New dependency : lucene-facet
    114118 * LuceneSearcher.makeSummary()
    115  * Add an option to search services to only produce the summary (like the fast option but really fast / only summary)
    116  * Add config file to define
    117   * criteria : MUST be in the index
    118   * criteria type : String|Number|Date
    119   * agregation type :
    120    * String : count
    121    * Number : count|equalInterval + classe ?| quantil + classe
    122    * Date : count|annualy|monthly|daily
    123    * sort option (count|name)
     119 * Add an option to search services to only produce the summary
     120 * LuceneConfig
     121  * Summary configuration is part of LuceneConfig
     122  * Summary configuration could be reload dynamically when the LuceneConfig is reload.
    124123
    125124