Comments (8)
please provide more details ...
Server.search("ip:'8.8.8.8'")
from search_cop.
irb(main):021:0> HostSearch.search(ip: '192')
NameError: uninitialized constant SearchCopGrammar::Attributes::Inet
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:89:in `const_get'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:89:in `attribute_for'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:55:in `block in attributes'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:55:in `collect'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:55:in `attributes'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop_grammar/attributes.rb:38:in `matches'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/hash_parser.rb:38:in `parse_attribute'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/hash_parser.rb:21:in `block in parse'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/hash_parser.rb:10:in `each'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/hash_parser.rb:10:in `collect'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/hash_parser.rb:10:in `parse'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop.rb:23:in `parse'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop/query_builder.rb:10:in `initialize'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop.rb:61:in `new'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop.rb:61:in `unsafe_search_cop'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop.rb:53:in `search_cop'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/search_cop-1.0.6/lib/search_cop.rb:44:in `block in search_scope'
from (irb):21
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/console.rb:110:in `start'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/console.rb:9:in `start'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from search_cop.
db: posgresql
from search_cop.
huh, could you please provide your search_cop
specification from your model ...
from search_cop.
class HostSearch < ::Host
include SearchCop
search_scope :search do
attributes :ip, :name
end
end
from search_cop.
schema
create_table "hosts", force: :cascade do |t|
t.inet "ip", null: false
t.string "name", limit: 255
end
from search_cop.
ah, ok, postgres specific datatype. search_cop currently supports text, numeric, date and boolean datatypes. I'll check if this should be extended, thx.
from search_cop.
thx
from search_cop.
Related Issues (20)
- globalize with search_cop - unknown attribute HOT 2
- Ignoring MySQL stop words for full-text search HOT 5
- Support for PostgreSQL ENUM HOT 3
- Matching multiple in a has_many HOT 1
- multiple where conditions and concatenated with AND HOT 3
- Attribute (case insensitive / ILIKE) HOT 3
- generator for attribute options HOT 3
- Error when using with non-standard pluralization in class name HOT 2
- DEPRECATION WARNING HOT 2
- How to handle special search logic / virtual attributes HOT 4
- Suggestion: Option for `exact: true` (or `right_wildcard: false`) HOT 1
- Can search_cop work with Postgres hstore? HOT 8
- Suggestion: Add support for sort in the free text search HOT 4
- Searching for empty or non empty with the free text expression HOT 2
- RAILS 6 - Search in ActionText HOT 3
- Search word that include % does not work correctly HOT 2
- Ability to apply Custom Operators or Options to entire project HOT 1
- ActiveRecord::ConfigurationError in v1.2.1 HOT 10
- README error? HOT 6
- Words containing brackets HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from search_cop.