mirror of
https://github.com/djohnlewis/stackdump
synced 2024-12-04 23:17:37 +00:00
Changed name of field from 'score' to 'votes' as score is a keyword in Lucene.
This commit is contained in:
parent
4fc9f4e780
commit
ea2170edb9
@ -500,7 +500,8 @@
|
||||
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
||||
<field name="siteName" type="string" indexed="true" stored="true" required="true" />
|
||||
<field name="creationDate" type="tdate" indexed="true" stored="false" required="true"/>
|
||||
<field name="score" type="tint" indexed="true" stored="false" required="true"/>
|
||||
<!-- the field name in XML is score, but that's a reserved lucene keyword -->
|
||||
<field name="votes" type="tint" indexed="true" stored="false" required="true"/>
|
||||
<field name="viewCount" type="tint" indexed="true" stored="false" required="true"/>
|
||||
<!-- TODO: the title field should be boosted at index-time -->
|
||||
<field name="title" type="text_general" indexed="true" stored="false" required="true"/>
|
||||
|
@ -391,7 +391,8 @@ class PostContentHandler(xml.sax.ContentHandler):
|
||||
doc['id'] = str(q['id'])
|
||||
doc['siteName'] = self.site.name
|
||||
doc['creationDate'] = q['creationDate']
|
||||
doc['score'] = q['score']
|
||||
# the XML field name is score, but score is a reserved lucene keyword
|
||||
doc['votes'] = q['score']
|
||||
doc['viewCount'] = q['viewCount']
|
||||
doc['title'] = q['title']
|
||||
doc['ownerUserId'] = q['ownerUserId']
|
||||
|
Loading…
Reference in New Issue
Block a user