|
a/Allura/allura/model/artifact.py |
|
b/Allura/allura/model/artifact.py |
|
... |
|
... |
206 |
|
206 |
|
207 |
def index(self):
|
207 |
def index(self):
|
208 |
"""
|
208 |
"""
|
209 |
Subclasses should override this, providing a dictionary of solr_field => value.
|
209 |
Subclasses should override this, providing a dictionary of solr_field => value.
|
210 |
These fields & values will be stored by solr. Subclasses should call the
|
210 |
These fields & values will be stored by solr. Subclasses should call the
|
211 |
super() index() and then extend it with more fields. All these fields will be
|
211 |
super() index() and then extend it with more fields.
|
212 |
included in the 'text' field (done by search.solarize())
|
|
|
213 |
|
212 |
|
214 |
The _s and _t suffixes, for example, follow solr dynamic field naming
|
213 |
The _s and _t suffixes, for example, follow solr dynamic field naming
|
215 |
pattern.
|
214 |
pattern.
|
216 |
You probably want to override at least title_s and text to have
|
215 |
You probably want to override at least title, title_s and text to have
|
217 |
meaningful search results and email senders.
|
216 |
meaningful search results and email senders.
|
218 |
"""
|
217 |
"""
|
219 |
|
218 |
|
220 |
project = self.project
|
219 |
project = self.project
|
221 |
return dict(
|
220 |
return dict(
|
222 |
id=self.index_id(),
|
221 |
id=self.index_id(),
|
223 |
mod_date_dt=self.mod_date,
|
222 |
mod_date_dt=self.mod_date,
|
224 |
title_s='Artifact %s' % self._id,
|
223 |
title_s='Artifact %s' % self._id,
|
|
|
224 |
title='Artifact %s' % self._id,
|
225 |
project_id_s=str(project._id),
|
225 |
project_id_s=str(project._id),
|
226 |
project_name_t=project.name,
|
226 |
project_name_t=project.name,
|
227 |
project_shortname_t=project.shortname,
|
227 |
project_shortname_t=project.shortname,
|
228 |
tool_name_s=self.app_config.tool_name,
|
228 |
tool_name_s=self.app_config.tool_name,
|
229 |
mount_point_s=self.app_config.options.mount_point,
|
229 |
mount_point_s=self.app_config.options.mount_point,
|