добавил обработку результатов с учетом рейтинга

обновил схему сорла
remotes/origin/stage5
Alexander Burdeiny 10 years ago
parent 70a0a30fa3
commit a68d6c03f8
  1. 2
      conference/search_indexes.py
  2. 152
      events/forms.py
  3. 2
      exposition/search_indexes.py
  4. 3
      functions/search_mixin.py
  5. 215
      schema_22.08.2016.xml
  6. 4
      schema_new.xml

@ -27,6 +27,8 @@ class ConferenceIndex(indexes.SearchIndex, indexes.Indexable, ExpoSearchMixin):
members_choice = indexes.IntegerField() members_choice = indexes.IntegerField()
visitors_choice = indexes.IntegerField() visitors_choice = indexes.IntegerField()
price_choice = indexes.IntegerField() price_choice = indexes.IntegerField()
expohit = indexes.BooleanField(model_attr='expohit')
rating = indexes.MultiValueField()
def prepare_form_name(self, obj): def prepare_form_name(self, obj):
return None return None

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re
from itertools import chain import operator
from itertools import chain, combinations
from collections import namedtuple from collections import namedtuple
from datetime import datetime from datetime import datetime
from datetime import timedelta from datetime import timedelta
@ -165,12 +166,20 @@ values_mapping = {
} }
RATING = ( RATING = (
(1, _(u'Топовые (HIT)')), ('r1', _(u'Топовые (HIT)')),
(2, _(u'Члены РСВЯ')), ('r2', _(u'Члены РСВЯ')),
(3, _(u'Члены UFI')), ('r3', _(u'Члены UFI')),
(4, _(u'ExpoRating')), ('r4', _(u'ExpoRating')),
) )
rating_mapping = [
{'value': 'r1', 'db_value': 1, 'label': _(u'Топовые (HIT)'), 'field': 'expohit'},
{'value': 'r2', 'db_value': int(Exposition.quality_label.ufi), 'label': _(u'Члены РСВЯ'), 'field': 'quality_label'},
{'value': 'r3', 'db_value': int(Exposition.quality_label.rsva), 'label': _(u'Члены UFI'), 'field': 'quality_label'},
{'value': 'r4', 'db_value': int(Exposition.quality_label.exporating), 'label': _(u'ExpoRating'), 'field': 'quality_label'},
]
monthes_abr_to_num = {v.lower(): k for k, v in enumerate(calendar.month_abbr)} monthes_abr_to_num = {v.lower(): k for k, v in enumerate(calendar.month_abbr)}
monthes_num_to_abr = {v: k for k, v in monthes_abr_to_num.iteritems()} monthes_num_to_abr = {v: k for k, v in monthes_abr_to_num.iteritems()}
year_month_regex = re.compile(r'^((?P<year>\d{4})(?P<month>\w{3}))|((?P<month_>\d{1,2})/(?P<year_>\d{4}))$') year_month_regex = re.compile(r'^((?P<year>\d{4})(?P<month>\w{3}))|((?P<month_>\d{1,2})/(?P<year_>\d{4}))$')
@ -248,7 +257,7 @@ class FilterForm(forms.Form):
choices=VISITORS, choices=VISITORS,
required=False, widget=FilterCheckboxSelectMultiple()) required=False, widget=FilterCheckboxSelectMultiple())
rating = FilterTypedMultipleChoiceField( rating = FilterTypedMultipleChoiceField(
label=_(u'Рейтинги'), coerce=int, label=_(u'Рейтинги'), coerce=str,
choices=RATING, choices=RATING,
required=False, widget=FilterCheckboxSelectMultiple()) required=False, widget=FilterCheckboxSelectMultiple())
@ -418,7 +427,7 @@ class FilterForm(forms.Form):
def filter(self, qs=None): def filter(self, qs=None):
qs = qs or self.default_filter() qs = qs or self.default_filter()
# lookup_kwargs = dict(ChainMap({}, *(lookup_kwargs or self.lookup_kwargs).values())) # lookup_kwargs = dict(ChainMap({}, *(lookup_kwargs or self.lookup_kwargs).values()))
qs = self.make_data_begin_filter(qs) qs = self.make_cleaned_sqs_filter(qs)
return qs.filter(**self.lookup_kwargs).order_by('data_begin') return qs.filter(**self.lookup_kwargs).order_by('data_begin')
def default_filter(self, load_all=True, _models=None): def default_filter(self, load_all=True, _models=None):
@ -432,10 +441,13 @@ class FilterForm(forms.Form):
qs = qs.filter(data_begin__gte=datetime.now().date()) qs = qs.filter(data_begin__gte=datetime.now().date())
return qs return qs
def make_data_begin_filter(self, qs): def make_cleaned_sqs_filter(self, qs):
params = self.make_date_begin_sqs_params() date_params = self.make_date_begin_sqs_params()
if params is not None: if date_params is not None:
qs = qs.filter(params) qs = qs.filter(date_params)
rating_params = self.make_rating_sqs_params()
if rating_params is not None:
qs = qs.filter(rating_params)
return qs return qs
def recalculate_choices(self): def recalculate_choices(self):
@ -476,6 +488,7 @@ class FilterForm(forms.Form):
self.fields[field].choices = self.make_local_field_count(field) or self.fields[field].choices self.fields[field].choices = self.make_local_field_count(field) or self.fields[field].choices
self.fields['month'].choices = self.make_date_begin_counts() self.fields['month'].choices = self.make_date_begin_counts()
self.fields['rating'].choices = self.make_rating_counts()
self.make_event_type_choices_count() self.make_event_type_choices_count()
# self.fields['month'].choices = self.month_choices() # self.fields['month'].choices = self.month_choices()
@ -489,7 +502,7 @@ class FilterForm(forms.Form):
choices = [] choices = []
for _type, label in TYPES: for _type, label in TYPES:
qs = self.default_filter(load_all=False, _models=[types.get(_type)]) qs = self.default_filter(load_all=False, _models=[types.get(_type)])
qs = self.make_data_begin_filter(qs) qs = self.make_cleaned_sqs_filter(qs)
count = qs.filter(**self.lookup_kwargs).count() count = qs.filter(**self.lookup_kwargs).count()
choices.append((_type, label + ' <i>({count})</i>'.format(count=count))) choices.append((_type, label + ' <i>({count})</i>'.format(count=count)))
self.fields['event_type'].choices = choices self.fields['event_type'].choices = choices
@ -583,10 +596,11 @@ class FilterForm(forms.Form):
) )
_joins, _where = self.make_joins_from_selected(field, model) _joins, _where = self.make_joins_from_selected(field, model)
joins.extend(_joins) joins.extend(_joins or [])
where.extend(_where) where.extend(_where or [])
where.append(self.make_default_where(db_table=model._meta.db_table)) where.append(self.make_default_where(db_table=model._meta.db_table))
self.make_date_begin_where(where, db_table=model._meta.db_table) self.make_date_begin_where(where, db_table=model._meta.db_table)
self.make_rating_where(where, db_table=model._meta.db_table)
selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by) selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
@ -669,9 +683,10 @@ class FilterForm(forms.Form):
) )
_joins, _where = self.make_joins_from_selected('data_begin', model) _joins, _where = self.make_joins_from_selected('data_begin', model)
joins.extend(_joins) joins.extend(_joins or [])
where.extend(_where) where.extend(_where or [])
where.append(self.make_default_where(db_table=model._meta.db_table)) where.append(self.make_default_where(db_table=model._meta.db_table))
self.make_rating_where(where, db_table=model._meta.db_table)
selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by) selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
@ -693,6 +708,64 @@ class FilterForm(forms.Form):
# with connection.cursor() as c: # with connection.cursor() as c:
return choices return choices
def make_rating_counts(self):
choices = []
sql = ''
selects = []
for model in self.models:
joins = []
where = []
group_by = ''
format_kwargs = {
'db_table': model._meta.db_table,
'lang': self.lang,
}
cases = []
for case in filter(lambda x: x['field'] == 'expohit', rating_mapping):
cases.append(
''' sum(case when (`{db_table}`.`{field}` = {db_value}) then 1 else 0 end) as '{value}' '''\
.format(value=case['value'], field=case['field'], db_value=case['db_value'], **format_kwargs)
)
for case in filter(lambda x: x['field'] != 'expohit', rating_mapping):
cases.append(
''' sum(case when (`{db_table}`.`{field}` = `{db_table}`.`{field}` | {db_value}) then 1 else 0 end) as '{value}' '''\
.format(value=case['value'], field=case['field'], db_value=case['db_value'], **format_kwargs)
)
select = \
''' SELECT {cases} FROM `{db_table}_translation` INNER JOIN `{db_table}` ON (`{db_table}_translation`.`master_id` = `{db_table}`.`id`) '''\
.format(cases=', '.join(cases), **format_kwargs)
where.append(
''' `{db_table}_translation`.`language_code` = '{lang}' '''\
.format(**format_kwargs)
)
_joins, _where = self.make_joins_from_selected('rating', model)
joins.extend(_joins or [])
where.extend(_where or [])
where.append(self.make_default_where(db_table=model._meta.db_table))
self.make_date_begin_where(where, db_table=model._meta.db_table)
selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
sql = ' union '.join(selects)
choices = []
if sql:
c = connection.cursor()
try:
c.execute(sql)
mapper = namedtuple('Result', [col[0] for col in c.description])
data = [mapper(*raw) for raw in c.fetchall()]
for value, label in RATING:
count = sum([getattr(x, value, 0) or 0 for x in data])
choices.append((value, label + ' <i>({count})</i>'.format(count=count)))
finally:
c.close()
# some bug with these! AttributeError: __exit__
# with connection.cursor() as c:
return choices
def get_date_begin_periods(self): def get_date_begin_periods(self):
periods = getattr(self, '_periods', None) periods = getattr(self, '_periods', None)
if periods is None: if periods is None:
@ -751,7 +824,7 @@ class FilterForm(forms.Form):
return None return None
def make_date_begin_where(self, where, db_table): def make_date_begin_where(self, where, db_table):
key = '_where_date_begin_where_{}'.format(db_table) key = '_make_date_begin_where_{}'.format(db_table)
_where = getattr(self, key, None) _where = getattr(self, key, None)
if _where is None: if _where is None:
_where = [] _where = []
@ -791,9 +864,34 @@ class FilterForm(forms.Form):
_where = [''' ({}) '''.format(' OR '.join(_where))] _where = [''' ({}) '''.format(' OR '.join(_where))]
setattr(self, key, _where) setattr(self, key, _where)
# print(_where) # print(_where)
where.extend(_where) where.extend(_where or [])
return return
def make_rating_where(self, where, db_table):
key = '_make_rating_where_{}'.format(db_table)
_where = getattr(self, key, None)
if _where is None:
cleaned = self.cleaned_data.get('rating', [])
_where = []
# choices = filter(lambda x: x['value'] in cleaned and x['field'] == 'expohit', rating_mapping)
for choice in filter(lambda x: x['field'] == 'expohit' and x['value'] in cleaned, rating_mapping):
_where.append(
''' `{db_table}`.`{field}` = {db_value} '''\
.format(field=choice['field'], db_value=choice['db_value'], db_table=db_table)
)
quality_label = []
for choice in filter(lambda x: x['field'] == 'quality_label' and x['value'] in cleaned, rating_mapping):
quality_label.append(choice['db_value'])
if quality_label:
_where.append(
''' `{db_table}`.`{field}` = `{db_table}`.`{field}` | {computed} '''\
.format(field=choice['field'], computed=reduce(operator.or_, quality_label), db_table=db_table)
)
if len(_where) > 1:
_where = [''' ({}) '''.format(' OR '.join(_where))]
setattr(self, key, _where)
where.extend(_where or [])
return
# def get_prev_month(self, date): # def get_prev_month(self, date):
# year = date.year # year = date.year
# month = date.month # month = date.month
@ -894,6 +992,19 @@ class FilterForm(forms.Form):
params |= SQ(**lookup) params |= SQ(**lookup)
return params return params
def make_rating_sqs_params(self):
params = None
if self.cleaned_data.get('rating'):
for choice in filter(lambda x: x['field'] == 'expohit' and x['value'] in self.cleaned_data.get('rating'), rating_mapping):
params = SQ(**{choice['field']: choice['db_value']})
quality_label = [x['db_value'] for x in filter(lambda x: x['field'] != 'expohit' and x['value'] in self.cleaned_data.get('rating'), rating_mapping)]
if quality_label:
if params is None:
params = SQ(**{'quality_label__in': quality_label})
else:
params |= SQ(**{'quality_label__in': quality_label})
return params
def make_count_select(self, field): def make_count_select(self, field):
selects = [] selects = []
case = None case = None
@ -953,10 +1064,11 @@ class FilterForm(forms.Form):
# FILTER current by other values # FILTER current by other values
_joins, _where = self.make_joins_from_selected(field, model) _joins, _where = self.make_joins_from_selected(field, model)
joins.extend(_joins) joins.extend(_joins or [])
where.extend(_where) where.extend(_where or [])
where.append(self.make_default_where(db_table=model._meta.db_table)) where.append(self.make_default_where(db_table=model._meta.db_table))
self.make_date_begin_where(where, db_table=model._meta.db_table) self.make_date_begin_where(where, db_table=model._meta.db_table)
self.make_rating_where(where, db_table=model._meta.db_table)
selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by) selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
if len(selects) == 2: if len(selects) == 2:

@ -28,6 +28,8 @@ class ExpositionIndex(indexes.SearchIndex, indexes.Indexable, ExpoSearchMixin):
members_choice = indexes.IntegerField() members_choice = indexes.IntegerField()
visitors_choice = indexes.IntegerField() visitors_choice = indexes.IntegerField()
price_choice = indexes.IntegerField() price_choice = indexes.IntegerField()
expohit = indexes.BooleanField(model_attr='expohit')
rating = indexes.MultiValueField()
def prepare_form_name(self, obj): def prepare_form_name(self, obj):
return None return None

@ -71,3 +71,6 @@ class ExpoSearchMixin(object):
def prepare_price_choice(self, obj): def prepare_price_choice(self, obj):
return obj.price_choice or 0 return obj.price_choice or 0
def prepare_rating(self, obj):
q = obj.quality_label
return [x.mask for x in filter(lambda x: x.is_set == True, [getattr(q, key) for key in q.iterkeys()])]

@ -0,0 +1,215 @@
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<schema name="default" version="1.5">
<types>
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
<fieldtype name="binary" class="solr.BinaryField"/>
<!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
<fieldtype name="geohash" class="solr.GeoHashField"/>
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="lang/stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
<filter class="solr.EnglishMinimalStemFilterFactory"/>
-->
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="lang/stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
<filter class="solr.EnglishMinimalStemFilterFactory"/>
-->
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="ngram" class="solr.TextField" >
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="edge_ngram" class="solr.TextField" positionIncrementGap="1">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
</analyzer>
</fieldType>
</types>
<fields>
<!-- general -->
<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="_version_" type="long" indexed="true" stored ="true"/>
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
<dynamicField name="*_t" type="text_en" indexed="true" stored="true"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
<field name="name_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="url" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="text" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="catalog_name_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="catalog_name_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="content_auto" type="edge_ngram" indexed="true" stored="true" multiValued="false" />
<field name="form_name" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="name_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="area_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="city_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="country_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="theme" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="tag" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="where" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="rating" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="data_end" type="date" indexed="true" stored="true" multiValued="false" />
<field name="members_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="data_begin" type="date" indexed="true" stored="true" multiValued="false" />
<field name="visitors_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="expohit" type="boolean" indexed="true" stored="true" multiValued="false" />
<field name="price_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="city" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="country" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="parent_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="parent_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
</fields>
<!-- field to use to determine and enforce document uniqueness. -->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="AND"/>
</schema>

@ -175,6 +175,8 @@
<field name="where" type="text_en" indexed="true" stored="true" multiValued="true" /> <field name="where" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="rating" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="data_end" type="date" indexed="true" stored="true" multiValued="false" /> <field name="data_end" type="date" indexed="true" stored="true" multiValued="false" />
<field name="members_choice" type="long" indexed="true" stored="true" multiValued="false" /> <field name="members_choice" type="long" indexed="true" stored="true" multiValued="false" />
@ -183,6 +185,8 @@
<field name="visitors_choice" type="long" indexed="true" stored="true" multiValued="false" /> <field name="visitors_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="expohit" type="boolean" indexed="true" stored="true" multiValued="false" />
<field name="price_choice" type="long" indexed="true" stored="true" multiValued="false" /> <field name="price_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="city" type="text_en" indexed="true" stored="true" multiValued="false" /> <field name="city" type="text_en" indexed="true" stored="true" multiValued="false" />

Loading…
Cancel
Save