Comments (2)
Not obvious to me - why shouldn't an empty string be indexed?
Or rather - why shouldn't an empty string be stored - an attribute on an object may well be stored in Solr without that field being indexed, and it is a perfectly reasonable thing for an object to have an attribute which is an empty string.
from sunburnt.
Thanks for the reply.
I guess the way I look at this is that I want one and only one way to know if an attribute has values.
Django itself solves this problem by having the convention that CharFields
are never null. So, the only value they can have is ""
. (As of about Django 1.7, a warning will be issued if your model has a nullable CharField.)
My idea here is along the same lines, but flips it so that blanks are normalized to None. It would also be possible, (though harder, I think?) to make None
values into blanks instead.
So, when indexing:
"" |
None |
Thoughts | |
---|---|---|---|
current | "" | no attr | This is OK, but inconsistent |
proposed | no attr | no attr | Good, easy to implement, opposite of Django convention |
alt proposal | "" | "" | Best? Harder to implement, aligns with Django convention |
Thanks again for the reply. Glad to see your involvement in the project.
from sunburnt.
Related Issues (20)
- DisMax Support HOT 2
- Unknown field_class 'solr.CurrencyField' HOT 9
- SorlResponse not show query params
- Required fields are unspecified HOT 1
- Sunburnt not compatible with newer versions of Solr XML output HOT 3
- filtering based on dictionary key value pairs HOT 3
- Fuzzy search support like term~0.7 HOT 1
- The non required parameter defaultSearchField in solr 3.6 causes search error HOT 2
- can't query on UUID field
- Error when using commitWithin parameter
- Support date range facets HOT 1
- Make sure invalid XML characters are stripped HOT 1
- sunburnt.schema SolrError
- Support to python3 HOT 2
- PyPI package information is missing project URL
- As of Solr 4.8, sunburnt will fail to parse the schema
- Valid type list is missing SpatialRecursivePrefixTreeFieldType HOT 1
- Variable set but never used
- Proposing a PR to fix a few small typos
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 sunburnt.