Add is:modeled query to items

This commit is contained in:
Emi Matchu 2024-11-19 15:54:55 -08:00
parent f6f618c9d5
commit 5472ccebef

View file

@ -132,6 +132,8 @@ class Item
is_positive ? Filter.is_np : Filter.is_not_np is_positive ? Filter.is_np : Filter.is_not_np
when 'pb' when 'pb'
is_positive ? Filter.is_pb : Filter.is_not_pb is_positive ? Filter.is_pb : Filter.is_not_pb
when 'modeled'
is_positive ? Filter.is_modeled : Filter.is_not_modeled
else else
raise_search_error "not_found.label", label: "is:#{value}" raise_search_error "not_found.label", label: "is:#{value}"
end end
@ -346,6 +348,14 @@ class Item
self.new Item.is_not_pb, '-is:pb' self.new Item.is_not_pb, '-is:pb'
end end
def self.is_modeled
self.new Item.is_modeled, 'is:modeled'
end
def self.is_not_modeled
self.new Item.is_not_modeled, '-is:modeled'
end
private private
# Add quotes around the value, if needed. # Add quotes around the value, if needed.