I did some experiments for finding empty fields, But i want to know whether
there is any other better method. Have to reduce hard disk space.


Method 1: Add "NULL String" in empty fields

We can search with null string for empty column & non empty column


Observations:

   - Index size will grow.
   - Suppose if we add one new column, then old documents will not have
   null string  for that new column in index.
   - While fetching results, more IO will happen because of null string.


Method 2: Add one extra field namely NON_EMPTY_COLUMN and add all not empty
column names in that.
We can search like NON_EMPTY_COLUMN:Field_Name, for empty column documents
we have to search with Not of field name

Observations:

   - Again Index size will grow
   - Fetching is not costly


Method 3: While Searching, iterate through results and check for empty
column by using doc.get

Observations:

   - Iterations will become costly, suppose required results is not present
   in first set of results.
   - Also IO big impact in this.

Reply via email to