Created
March 8, 2009 12:01
-
-
Save robyoung/75746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc = solrpy.Document(1.6) | |
# like a dictionary | |
doc['id'] = 1 | |
doc['title'] = solrpy.Field("Lucene in Action", boost=1.5) | |
doc['author'] = ["Erik Hatcher", solrpy.Field("Otis Gospodnetić", boost=1.1)] | |
# or with add() | |
doc.add(id=1, title=solrpy.Field("Lucene in Action", boost=1.5), author=["Erik Hatcher", solrpy.Field("Otis Gospodnetić", boost=1.1)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment