Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add in the poster_path so we can do thumb:poster_path in Quepid! #13

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions indexTmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ def indexableMovies():
if 'release_date' in tmdbMovie and len(tmdbMovie['release_date']) > 0:
releaseDate = tmdbMovie['release_date'] + 'T00:00:00Z'

posterPath = None
if 'poster_path' in tmdbMovie and tmdbMovie['poster_path'] != None:
posterPath = 'https://image.tmdb.org/t/p/w185' + tmdbMovie['poster_path']

yield {'id': movieId,
'title': tmdbMovie['title'],
'overview': tmdbMovie['overview'],
'tagline': tmdbMovie['tagline'],
'poster_path': posterPath,
'cast_nomv': " ".join([castMember['name'] for castMember in tmdbMovie['cast']]),
'directors': [director['name'] for director in tmdbMovie['directors']],
'cast': [castMember['name'] for castMember in tmdbMovie['cast']],
Expand Down
47 changes: 24 additions & 23 deletions solr_home/tmdb/conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
limitations under the License.
-->

<!--
<!--
This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default)
(i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it.

This example schema is the recommended starting point for users.
Expand Down Expand Up @@ -47,19 +47,19 @@

<schema name="example-basic" version="1.6">
<!-- attribute "name" is the name of this schema and is only used for display purposes.
version="x.y" is Solr's version number for the schema syntax and
version="x.y" is Solr's version number for the schema syntax and
semantics. It should not normally be changed by applications.

1.0: multiValued attribute did not exist, all fields are multiValued
1.0: multiValued attribute did not exist, all fields are multiValued
by nature
1.1: multiValued attribute introduced, false by default
1.2: omitTermFreqAndPositions attribute introduced, true by default
1.1: multiValued attribute introduced, false by default
1.2: omitTermFreqAndPositions attribute introduced, true by default
except for text fields.
1.3: removed optional field compress feature
1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
behavior when a single string produces multiple tokens. Defaults
behavior when a single string produces multiple tokens. Defaults
to off for version >= 1.4
1.5: omitNorms defaults to true for primitive field types
1.5: omitNorms defaults to true for primitive field types
(int, float, boolean, string...)
1.6: useDocValuesAsStored defaults to true.
-->
Expand Down Expand Up @@ -106,14 +106,14 @@
trailing underscores (e.g. _version_) are reserved.
-->

<!-- In this data_driven_schema_configs configset, only three fields are pre-declared:
<!-- In this data_driven_schema_configs configset, only three fields are pre-declared:
id, _version_, and _text_. All other fields will be type guessed and added via the
"add-unknown-fields-to-the-schema" update request processor chain declared
"add-unknown-fields-to-the-schema" update request processor chain declared
in solrconfig.xml.
Note that many dynamic fields are also defined - you can use them to specify a

Note that many dynamic fields are also defined - you can use them to specify a
field's type via field naming conventions - see below.

WARNING: The _text_ catch-all field will significantly increase your index size.
If you don't need it, consider removing it and the corresponding copyField directive.
-->
Expand All @@ -122,6 +122,7 @@
<field name="title" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true"
termOffsets="true"/>
<field name="tagline" type="text_general" indexed="true" stored="true"/>
<field name="poster_path" type="string" indexed="false" stored="true"/>
<field name="cast" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="directors" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="genres" type="text_general" indexed="true" stored="true" multiValued="true"/>
Expand Down Expand Up @@ -224,11 +225,11 @@
<field name="text_all" type="text_general" indexed="true" stored="true" multiValued="true"/>


<!-- uncomment the following to ignore any fields that don't already match an existing
field name or dynamic field, rather than reporting them as an error.
alternately, change the type="ignored" to some other type e.g. "text" if you want
unknown fields indexed and/or stored by default
<!-- uncomment the following to ignore any fields that don't already match an existing
field name or dynamic field, rather than reporting them as an error.
alternately, change the type="ignored" to some other type e.g. "text" if you want
unknown fields indexed and/or stored by default

NB: use of "*" dynamic fields will disable field type guessing and adding
unknown fields to the schema. -->
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
Expand Down Expand Up @@ -324,11 +325,11 @@

<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
to generate pseudo-random orderings of your docs for sorting
to generate pseudo-random orderings of your docs for sorting
or function purposes. The ordering is generated based on the field
name and the version of the index. As long as the index version
remains unchanged, and the same field name is reused,
the ordering of the docs will be consistent.
the ordering of the docs will be consistent.
If you want different psuedo-random orderings of documents,
for the same version of the index, use a dynamicField and
change the field name in the request.
Expand Down Expand Up @@ -403,7 +404,7 @@
posn
1 2 3 4 5
the science(2) fi (2) fiction movie
sci(1)
sci(1)
sci-fi(3)


Expand Down Expand Up @@ -785,8 +786,8 @@


<!-- Similarity is the scoring routine for each document vs. a query.
A custom Similarity or SimilarityFactory may be specified here, but
the default is fine for most applications.
A custom Similarity or SimilarityFactory may be specified here, but
the default is fine for most applications.
For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
-->
<!--
Expand Down