Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better core search #2286

Merged
merged 51 commits into from
Apr 5, 2018
Merged

Better core search #2286

merged 51 commits into from
Apr 5, 2018

Commits on Mar 19, 2018

  1. refactor(Search): refactor html_search into Ui/Search

    This commit should be without functional changes.
    micgro42 committed Mar 19, 2018
    Configuration menu
    Copy the full SHA
    21fcef8 View commit details
    Browse the repository at this point in the history
  2. feat(Search): Add search form on results page

    Add the search form on the results page itself. This form will be used
    to add more options to refine the search further.
    micgro42 committed Mar 19, 2018
    Configuration menu
    Copy the full SHA
    427ed98 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2018

  1. feat(search): add search assistance for simple queries

    This add some search assistance to simple, single-word search queries
    which may be restricted to a single namespace.
    
    Further improvements:
    * better styling
    * trigger events for other plugins
    * set namespaces directly from fulltext search results
    * some more config options
    micgro42 committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    bb8ef86 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2018

  1. feat(search): trigger event for each result

    Add events around each search result, both for the pagename results
    and the fullpage results.
    
    The fullpage results are wrapped in a div for better separation and
    styling.
    ( see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl )
    
    These events are intended to provide plugin authors with the ability
    to hydrate the search results with more information.
    micgro42 committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    4eab6f7 View commit details
    Browse the repository at this point in the history
  2. feat(search): trigger event for search form modification

    Plugins may want to offer more ways to filter the search results.
    micgro42 committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    81a0edd View commit details
    Browse the repository at this point in the history
  3. feat: add a simple unparser for parsed search queries

    To allow creating links with manipulated versions of the current search
    query an unparser is necessary. However, the current output of ft_queryParser
    makes some advanced features hard to detect. Therefore the new
    ft_queryUnparser_simple cannot handle negated phrases and `OR` searches.
    
    It should still cover 98% of search queries.
    micgro42 committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    44156e1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4c924eb View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2018

  1. refactor: make tpl_seachform use dokuwiki\Form

    This makes it easier to read, reason and extend.
    micgro42 committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    3c7a332 View commit details
    Browse the repository at this point in the history
  2. feat(search): add origin page as parameter

    There are several use cases in which knowing the page where a search
    request originated would be useful. This commit adds a `from` parameter
    which provides that information.
    micgro42 committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    cbcc2fa View commit details
    Browse the repository at this point in the history
  3. feat(search): add config options to adjust default behavior

    This adds two new config options:
    
    `search_limit_to_first_ns`:
    Limit the search to the current X namespaces. When a search is executed
    from a page within a deeper namespace, the first X namespaces will be
    added as filter.
    Possible use case could be with language namespaces to ensure that the
    default search is initially within the current language.
    
    `search_default_fragment_behaviour`:
    Option to specify the default fragment search behavior
    micgro42 committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    d09b5b6 View commit details
    Browse the repository at this point in the history
  4. feat(search): show search adjustments as links

    This simplifies many aspects. However, it still needs much better
    styling.
    micgro42 committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    4d0cb6e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e5bf110 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2018

  1. fix: readd div with no-class to tpl_searchform

    Quick-search positioning and other templates break when removing this
    tag.
    micgro42 committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    3eb2b86 View commit details
    Browse the repository at this point in the history
  2. fix(search): namespace limits must match exactly

    This fixes a bug that during a search limited to `@de` would show pages
    form the namespace `devel` as well (in the fullpage results).
    
    Fixes #2285
    micgro42 committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    de3383c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a75abf View commit details
    Browse the repository at this point in the history
  4. feat(search): filter results by lastmod time

    This allows filtering of results by the last modified time. It still
    needs a custom date entry option, highlighting of the currently selected
    option (if any) and a better place where the filtering happens.
    micgro42 committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    bbc1da2 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2018

  1. feat(search): use dedicated url-parameter for search query

    This way we do not loose the context of the current page. Further, the
    new id generated from the query before wasn't really that useful (see
    issue #1124 ). And we can still generate a meaningful link "create a
    page for your query", if that is considered useful.
    
    Further redirects exist for the old urls, so bookmarked searches etc.
    should mostly keep working.
    micgro42 committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    d22b78c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3cfe85 View commit details
    Browse the repository at this point in the history
  3. fix(search): don't truncate namespaces with - and . in pagename-lookup

    The regex for the pagename lookup didn't account for `-` and `.` being
    valid characters for namespaces, which lead to wrong results in the
    quicksearch and pagename lookup. The full search, which already used the
    queryParser, showed the correct results.
    
    This fixes #1659
    micgro42 committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    940f24f View commit details
    Browse the repository at this point in the history
  4. refactor(search): move filtering by time into _ft_page*

    This is the more appropriate place for that functionality, because now
    it happens inside the default function for the respective pagesearch and
    pagelookup events and can be properly handled by plugins.
    micgro42 committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    1b48999 View commit details
    Browse the repository at this point in the history
  5. refactor(search): extract simplified SearchState class

    Building the new search links is complex and we're going to add another
    parameter with the new sorting by mtime. Extracting a new class seems
    like the cleanest way to handle that increasing complexity.
    micgro42 committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    18856c5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8d0e286 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6639a15 View commit details
    Browse the repository at this point in the history
  8. feat(search): display search tools as lists on click

    This functionality is inspired by what other large search engines are
    doing.
    micgro42 committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    b005809 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    01c23ba View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2018

  1. feat(search) more nuanced tool deactivation

    This gives create control over when a query is too complex for tool
    support.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    df97724 View commit details
    Browse the repository at this point in the history
  2. fix(search): detect irregular fragment query

    If the entered query does not cleanly fall into the area of the given
    options, show the current behavior as "custom".
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    c6b5b74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5facb9b View commit details
    Browse the repository at this point in the history
  4. fix(search): remove overlook from parameter

    That parameter was introduced in cbcc2fa and removed in d22b78c
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    340f849 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1265b19 View commit details
    Browse the repository at this point in the history
  6. feat(search): trigger new event for small search field form

    This also renames the event for the search form on the search page.
    
    The scheme for naming events that provide the new Form-class as $data is
    FORM_<formname>_OUTPUT
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    16ece95 View commit details
    Browse the repository at this point in the history
  7. first go at styling

    This removes a lot of reudundant CSS classes in favor of cascading
    selectors. Styling isn't done, yet this is just a first step.
    
    Still to do:
    
    * aria labels
    * styling the toggle mechanism
    * RTL styling
    * making sure everything displays correct when no JS is available
    * translations may be missing
    * refactoring the rest of search.less to make use of LESS features
    splitbrain committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    4bdf82b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    55dc878 View commit details
    Browse the repository at this point in the history
  9. l10n(search): Add link to create page from query to searchintro

    Implements the functionality requested in #1124
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    2ce8aff View commit details
    Browse the repository at this point in the history
  10. refactor(search): rewite SearchState to make behavior more obvious

    As suggested by @splitbrain SearchState now behaves simliar to the PSR-7
    message interfaces.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    52d4cd4 View commit details
    Browse the repository at this point in the history
  11. refactor(search): provide before/after arguments to search event

    This way they can be cleanly influenced by the plugins instead of having
    to modify global state.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    3850270 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c5bd572 View commit details
    Browse the repository at this point in the history
  13. fix: display "show" item in page menu during search action

    Since we no longer change the page during a search, using the "show"
    menu item to return to the current page makes more sense.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    220966d View commit details
    Browse the repository at this point in the history
  14. fix(search): don't search for current page if submitting empty form

    Pressing enter in the small quick-search-box while it was empty resulted
    in a search for the current pageid.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    3286c65 View commit details
    Browse the repository at this point in the history
  15. feat(Form): add parameter to omit security token in forms

    This is useful for anonymously useable forms, like the search.
    micgro42 committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    7fa270b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    be76738 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2018

  1. refactor search.less

    splitbrain committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    c6070d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0fc3880 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1d91889 View commit details
    Browse the repository at this point in the history
  4. added aria attributes

    splitbrain committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    2171f9c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c2d6156 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a00078f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    826e222 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fc46ed5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ec27794 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2018

  1. refactor: rename dta and dtb parameters

    They are now named min and max respectively, which is hopefully less
    cryptic.
    micgro42 committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    422bbbc View commit details
    Browse the repository at this point in the history