Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S search
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 91
    • Issues 91
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dariah
  • search
  • Issues
  • #61

Closed
Open
Created Jan 22, 2018 by Gradl, Tobias@tgradlOwner

Query suggestions

Suggestion feature could be backed by ES requires special mappings though.

Additional information:

JS Snippet based on typeahead and bloodhound:

// instantiate the bloodhound suggestion engine
var creditors = new Bloodhound({
datumTokenizer: function (d) {
return Bloodhound.tokenizers.whitespace(d.value)
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: window.location.pathname + “/async/quicksearchsearch”,
replace: function(url, query) {
return url + “#” + query;
},
ajax : {
type: “POST”,
data: {
q: function() {
return $(‘#expression’).val();
}
}
}
}
});
// initialize the bloodhound suggestion engine
creditors.initialize();

$(‘#expression’).typeahead(
{
items: 4,
source:creditors.ttAdapter()
});

(from redmine: issue id 74, created on 2018-01-22tgradl, closed on 2018-01-22)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking