Comments (8)
It seems self.__class__.fields is supposed to return a list, but it returns a
tuple
containing the fields, like (['title', 'body'],) so the code figures these are
tags
instead of fields.
I'm using last django trunk version.
Original comment by [email protected]
on 8 Mar 2009 at 2:57
from djapian.
Please post here you indexer class definition
Original comment by daevaorn
on 8 Mar 2009 at 6:26
from djapian.
Here it its. Modifiying the code to manage what we get from Django in the init
works
for me ...
{{{
class EntryIndexer(djapian.Indexer):
fields = ['headline',
'body_markdown',
],
tags=[
( "title","headline", 1),
( "body","body_markdown", 2),
]
trigger=lambda indexer, obj: obj.active
djapian.add_index(Entry, EntryIndexer, attach_as="indexer")
}}}
Original comment by [email protected]
on 8 Mar 2009 at 8:10
from djapian.
Oh, you have unneeded comma after fields list closing brace
Original comment by daevaorn
on 8 Mar 2009 at 9:25
from djapian.
:) True
I shoud have checked the code alt lest a dozen of times :). Thanks!
Original comment by [email protected]
on 8 Mar 2009 at 9:31
from djapian.
I've removed the comma and it works perfectly. Thanks again!
Original comment by [email protected]
on 8 Mar 2009 at 9:35
from djapian.
Ok. Glad to help.
Original comment by daevaorn
on 8 Mar 2009 at 9:37
- Changed state: WontFix
from djapian.
Original comment by daevaorn
on 8 Mar 2009 at 10:22
- Changed state: Invalid
from djapian.
Related Issues (20)
- Xapian 1.2 support HOT 8
- Add way to figure out the model in the template for composite searches and linking to the results HOT 16
- Running manage.py index causes Exception HOT 2
- Add a recursive field resolver
- Indexer fails with null values HOT 3
- Incompatibility with latest Xapian 1.2.2 release HOT 4
- A management command for per-application index rebuild HOT 4
- have to constantly rebuild index HOT 12
- AssertionError on djapian.tests.query._QueryTest_subject:test and djapian.tests.query._QueryTest_title:test HOT 7
- Error on prefetch when objects is already deleted, but xapian index not updated, yet HOT 6
- CompositeIndexer not returning tags HOT 1
- Incorrect ordering HOT 2
- CompositeIndexer does not support collapsing by a [common] tag. HOT 2
- Store Arbitrary data in search db HOT 4
- order_by() does not change results ordering
- manage.py index fails on deletion of a model with multiple indexers HOT 1
- Add documentation about install xapian on macOSX via homebrew
- xapian.DatabaseModifiedError exception is unhadled HOT 6
- ./manage.py index does not work in django 1.4 HOT 5
- Tag searches on composite indexes is not working properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djapian.