bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r1456482 - in /incubator/bloodhound/trunk: bloodhound_search/bhsearch/default-pages/BloodhoundSearch installer/bloodhound_setup.py
Date Thu, 14 Mar 2013 15:30:48 GMT
Author: andrej
Date: Thu Mar 14 15:30:47 2013
New Revision: 1456482

URL: http://svn.apache.org/r1456482
Log:
updating BloodhoundSearch page, setting the page to be loaded during bloodhound setup

Modified:
    incubator/bloodhound/trunk/bloodhound_search/bhsearch/default-pages/BloodhoundSearch
    incubator/bloodhound/trunk/installer/bloodhound_setup.py

Modified: incubator/bloodhound/trunk/bloodhound_search/bhsearch/default-pages/BloodhoundSearch
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/default-pages/BloodhoundSearch?rev=1456482&r1=1456481&r2=1456482&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/default-pages/BloodhoundSearch (original)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/default-pages/BloodhoundSearch Thu
Mar 14 15:30:47 2013
@@ -1,71 +1,83 @@
 = Bloodhound Search =
 
-Current version is prototype phase 1. Read more about proposed functionality on [wiki:Proposals/BEP-0004
BEP-0004]
+Bloodhound Search is currently in prototype phase. Read more about proposed functionality
on [wiki:Proposals/BEP-0004 BEP-0004]
 
 == How to enable Bloodhound Search==
- * Currently, Bloodhound Search is available only for dev configuration. Make sure that Bloodhound
was installed using requirements-dev.txt:
+Currently, Bloodhound Search is available only for dev configuration. Make sure that Bloodhound
was installed using requirements-dev.txt:
 {{{
 pip install -r requirements-dev.txt
 }}}
- * enable bhsearch.* components in trac.ini file
+
+Enable bhsearch.* components in trac.ini file and set Bloodhound Search as default search
component
 {{{
 [components]
 ...
 bhsearch.* = enabled
+
+[bhsearch]
+is_default = true
 }}}
- * run initial index rebuild using trac-admin command line tool. TODO: web interface should
be supported later
+
+Run initial index rebuild using trac-admin command line tool. TODO: reindexing using admin
web interface should be supported later
 {{{
 trac-admin <path_to_trac_environment> bhsearch rebuild
 }}}
- * Bloodhound Search page will be available in Apps menu | Bloodhound Search
-
-== Search == #search
-Query syntax is described on wiki:Proposals/BEP-0004/ResourceQuery. Currently supported search
queries are: 
-* List of all items: "*"
-* Free text search through indexed fields e.g. "some text"
+ 
+== How to search == #search
+Click Apps menu and select Bloodhound Search item. You can search use free text search or
combine search with query syntax. Please consider below a few search samples: 
+* Free text search through multiple fields e.g. "some text"
 * Combination of free text and field specific query e.g. "test status:new keyword:starter"
(default operator is AND)
 * Field specific query e.g. "status:new keyword:starter" (default operator is AND)
 * Boolean queries e.g. "test OR (status:new and keyword:starter)"
+* Use meta-keywords e.g. "some text $resolved". Read more in [#meta-keywords Meta-keywords]
chapter
+For more information on query syntax see wiki:Proposals/BEP-0004/ResourceQuery. 
 
-Currently, only tickets and wiki pages with the following fields are indexed. Later more
resources and fields will be added.
+Currently, you can search in tickets, wiki pages and milestones (later more resources will
be added). Use All | Ticket | Wiki | Milestone tabs to search entries of specific type.
 
-Common fields for all resources:
- * id - resource id. For ticket it is ticket id, for wiki it will wiki page name.
- * type - resource type e.g. ticket, wiki etc.
- * product - product name
+Bloodhound Search provides basic faceting functionality. Facets are specific for each resource
type. More complex faceting can be introduced later, for example: date rages, pivot faces
etc.
+
+== Supported fields #fields
+=== Common fields for all resources
+ * id - resource id. For ticket it is ticket id, for wiki it is wiki page name.
+ * type - resource type e.g. ticket, wiki, milestone etc.
  * time - resource change time
  * author - resource author. For ticket it is ticket reporter.
  * content - ticket description, wiki page content
- * changes - currently, only ticket comments are indexed
 
-Ticket specific fields:
+=== Ticket specific fields
  * component
  * status 
  * resolution
  * keywords
  * milestone
  * summary
+ * changes - ticket comments
 
-Default sort order is by boost score ASC and time DESC
-
-Default query boosting is: id = 6, type = 2, summary = 5, author = 3, milestone = 2, keywords
= 2, component = 2, status = 2, content = 1, changes = 1, 
+=== Milestone specific fields
+ * status - possible values are "completed" or "open"
+ * due - milestone due value in date-time format
+ 
+== Meta-keywords #meta-keywords
+Consider Bloodhound Search meta-keywords as shortcuts for commonly used query expressions.
Meta-keyword starts with "$" character. Bloodhound Search supports the following meta-keywords:
+ * $resolved - resolved to {{{status:(resolved OR closed)}}} query
+ * $unresolved - resolved to {{{NOT $resolved}}} query
+ * $ticket, $milestone, $wiki - resolved to {{{type:ticket|milestone|wiki}}} query
+ * $me - resolved to currently logged in user name
+ * $my - resolved to {{{owner:$me}}}
+{{{
+#!comment
+Add wiki macro in order to automatically generate list of supported meta-keywords and help
description
+}}}
 
-== Prototype phase 2 limitations == #limitations
- * Only tickets and wiki pages are indexed.
- * UI does not support faceting
- * Search  does not support meta keywords 
- * Quick jump by ticket id and wiki name is not supported
- * Possible bugs and inconveniences expected for prototype 
-
-== To be done ==
-Please consider below not complete list of TODOs.
- * UI design for search results including facets and resource specific presentation. Initial
proposal can be found on [wiki:Proposals/BEP-0004#resultview BEP-0004]
- * Add facet support for search UI
- * Improve index quality e.d. add more resources in index (milestones etc.), index more fields
for ticket. Support pluggable schema generation.
- * Improve search quality
- * Improve index consistency. [=#consistency]  
-   * Current implementation uses ITicketChangeListener interface that triggers after DB committed.
There is some chances to get inconsistency between DB and index. In this case reindex is required.
One of the possible solution is contact Trac community to introduce a new within transaction
 I<Resource>ChangingListener interface, save changes into additional table and index
changes in separate thread.
-   * Some ticket changes are not reflected in event interfaces e.g. Version and Component
renaming. One of the possible solution is to contact Trac community to introduce new interfaces.
-   * Alternative solution is triggering events from SQL proxy developed on multi-product
branch
-   * Usage of DB triggers is another alternative
- * A lot more things to do :)
\ No newline at end of file
+== URL query parameters #parameters
+Bloodhound Search supports the following URL query parameters:
+ * '''q''' - query string, for example: .../bhsearch?q=test
+ * '''type''' - type of resource to search in. Currently, supported types are ticket, wiki
and milestone, for example: .../bhsearch?type=ticke
+ * '''fq''' - filter query. Filter queries are not boosted and used to additionally filter
search output. Bloodhound Search joins multiple filter queries using AND operator, for example:
.../bhsearch?fq=status:"new"&fq=component:"c1" results to filter query: status:"new" AND
component:"c1"
+ * '''pagelen''' - number of rows that should be returned in a single page, for example .../bhsearch?pagelen=20.
Default pagelen value is 10
+ * '''page''' - number of page in the current result set that should be returned
+ * '''view''' - the parameter specify hor search results should presented. Currently supported
value is {{{grid}}}. If parameter is missing, free text presentation will be used. Usage sample:
{{{view=grid}}}
+ * '''sort''' - specifies search results sorting. By default, results are sorted by relevance
score and resource time ({{{sort=score, time desc}}}). 
+  * A sort parameter must include a field name (or the pseudo-field {{{score}}}), optionally
followed by whitespace (escaped as + or %20 in URL strings) and followed by a sort direction
({{{asc}}} or {{{desc}}}). If if direction is missing, {{{asc}}} is used by default.
+  * Multiple sort orderings can be separated by a comma, ie: {{{sort=<field name>+<direction>[,<field
name>+<direction>]...}}} For example: {{{sort=component, milestone desc}}}
+   
\ No newline at end of file

Modified: incubator/bloodhound/trunk/installer/bloodhound_setup.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/bloodhound_setup.py?rev=1456482&r1=1456481&r2=1456482&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ incubator/bloodhound/trunk/installer/bloodhound_setup.py Thu Mar 14 15:30:47 2013
@@ -229,9 +229,12 @@ class BloodhoundSetup(object):
         # final upgrade
         print "Running upgrades"
         bloodhound.onecmd('upgrade')
-        pages =  pkg_resources.resource_filename('bhdashboard',
-                                                 'default-pages')
-        bloodhound.onecmd('wiki load %s' % pages)
+        pages = []
+        pages.append(pkg_resources.resource_filename('bhdashboard',
+                                                 'default-pages'))
+        pages.append(pkg_resources.resource_filename('bhsearch',
+                                                 'default-pages'))
+        bloodhound.onecmd('wiki load %s' % " ".join(pages))
 
         print "Running wiki upgrades"
         bloodhound.onecmd('wiki upgrade')



Mime
View raw message