refinerycms-search icon indicating copy to clipboard operation
refinerycms-search copied to clipboard

Searching not working entirely...

Open Znow opened this issue 8 years ago • 6 comments

Hi

I'm using this gem on an existing Refinery project. The project has a loads of custom engines, pretty standard stuff.

The "Point" engine has a "project_external_id" field.

# encoding: UTF-8

module Refinery
  module Wayfinders
    class Point < Refinery::Core::BaseModel
      acts_as_indexed :fields => [:number, :project_external_id]
    end
  end
end

In my local db, I have at least 10 records, with project_external_id set to "760".

But, when I try search for "760", I get no search results.

Then I try to search for ex. "714", which is another project_external_id, and then I get 1 result for "714", and the actually all the results for "760"

image

If I clear out the search, I can see all the records belonging to "714" just fine.

image

This doesn't make any sense.

On another version of the same app, running an earlier version of Refinery and therefore using refinery-search 2.1.0, then the search for "760" works just fine:

image

What is happening?

Kind regards

Znow avatar Jul 05 '16 16:07 Znow

Hi @Znow,

Did you reindex your records after adding :project_external_id?

https://github.com/refinery/refinerycms-search#index-records

bricesanchez avatar Jul 05 '16 16:07 bricesanchez

@bricesanchez - Yes ofc :-) Project_external_id has always been there.

Znow avatar Jul 05 '16 19:07 Znow

Could you copy/paste your Gemfile.lock ?

bricesanchez avatar Jul 05 '16 19:07 bricesanchez

@bricesanchez I've pasted it in a Gist, it's pretty long :p

https://gist.github.com/Znow/cce864cd6f1b080057b44e3dd486aac6

Znow avatar Jul 05 '16 19:07 Znow

I don't know what happens, sorry.

bricesanchez avatar Jul 05 '16 20:07 bricesanchez

Well, there must be a way to further investigate this

Znow avatar Jul 06 '16 06:07 Znow