Search results no longer include delimiter pipe
- Dominant language
- PHP
- Stars
- 139
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
My page titles are build like
Product Version | Section | Topic
Until some recent change which I can not fathom the search result would look like that.
Now the search result is only "Topic".
I'm trying to find out if your indexer does something different.
My implementation looks like this, pretty much the reference from your instructions:
Script insertion in the actual page template
```
" />
" />
$(document).on("keyup", "#searchbox", function() {
var result = jssearch.search($(this).val());
$('#query').html(jssearch.queryWords.join(' '));
$('#results').html('');
var i = 0;
result.forEach(function(item) {
if (i++ > 20) {
return;
}
var div = $('#results');
var version = "<%= version %>"
var location = window.location.href;
var pos = location.substr(0, location.search(version));
var oerl = item.file.url;
var clean = oerl.substr(2, oerl.length)
div.html(div.html() + '<li>' + '<a href="' + pos + version + clean + '">' + item.file.title + '</a>' + '</li>');
});
});
```
I've also updated to 0.9.3 and I see the same behavior.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the page-template integration and compare the generated jssearch.index.js data with the jssearch.js search results for titles containing pipe delimiters. Reproduce the behavior on version 0.9.3 using a title such as “Product Version | Section | Topic,” then trace where item.file.title is produced. Done means the full title, including delimiters, appears in the rendered result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100