Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

"full-text search" donot work! #63

Closed
ShengChangJian opened this issue Jun 30, 2016 · 4 comments
Closed

"full-text search" donot work! #63

ShengChangJian opened this issue Jun 30, 2016 · 4 comments

Comments

@ShengChangJian
Copy link

When I use the search.json which not enable the full-text search, do work very well to search the post.
But When I replace the search.json to enable the full-text search, it donot work anymore and it cannot search nothing and even no feedback with "No find results" .
I donot know the reason.

@yo1995
Copy link
Contributor

yo1995 commented Aug 25, 2016

@ShengChangJian 应该是编码的问题,全英文就可以。正在看怎么改一下……
probably the coding problem. try to use utf-8
或者是@符号的问题……

Edit; 与中文无关,是控制符和标点的问题。我是因为用了liquid导致有些句法与这里冲突。

@yo1995
Copy link
Contributor

yo1995 commented Aug 25, 2016

module Jekyll
  module CharFilter
    def remove_chars(input)
      input.gsub! '\\','\'
      input.gsub! /\t/, '    '
      input.gsub! '@',''
      input.gsub! '$',''
      input.gsub! '%',''
      input.gsub! '&',''
      input.gsub! '"',''
      input.gsub! '{',''
      input.gsub! '}',''
      input
    end
  end
end

Liquid::Template.register_filter(Jekyll::CharFilter)

Manually modified version for json files with some restrictions.
Hope the developer can ameliorate the existing plugin scripts..:confused:

@christian-fei
Copy link
Owner

@ShengChangJian thanks for your feedback!
Will look into this

@christian-fei
Copy link
Owner

christian-fei commented Aug 25, 2016

Should be fixed with the new release v1.1.5

yo1995 added a commit to yo1995/Simple-Jekyll-Search that referenced this issue Feb 10, 2018
Problem description: when I call function SimpleJekyllSearch several times on the same page, the resultsContainer will duplicate the search results.
Method to solve: use built-in clear method to clear the global variable 'data' before inserting again.

- Update simple_search_filter.rb

check christian-fei#63
The problem seems to be related with special chars in the content field. As the former plugin deals with English text within the range of ACSII, my added plugin works well with my Chinese context.
christian-fei pushed a commit that referenced this issue Mar 18, 2018
Problem description: when I call function SimpleJekyllSearch several times on the same page, the resultsContainer will duplicate the search results.
Method to solve: use built-in clear method to clear the global variable 'data' before inserting again.

- Update simple_search_filter.rb

check #63
The problem seems to be related with special chars in the content field. As the former plugin deals with English text within the range of ACSII, my added plugin works well with my Chinese context.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants