As in the title:
For example
index_analyze(my_inst, "sometext", analyzer='standard')
will generate a warning (Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.)
As far as I can see, this is due to line 15 in index_analyze (line 478 in file R/index.R), where I(filters) and I(char_filters) is called. This is as I(NULL) generates the warning (as setting any attribute, including the class attribute, on NULL is invalid)
Proposed fix:
Add 2 lines between line 12 and 13:
if (!is.null(filters)) filters <- I(filters)
if (!is.null(char_filters)) char_filters <- I(char_filters)
And delete the I's in the next call (on line 15 but also on line 22)
Environment
Using elastic version 1.0.0
under R 3.6.1 and 3.6.2
Using Rstudio under windows
As in the title: For example
index_analyze(my_inst, "sometext", analyzer='standard')
will generate a warning (Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.
)As far as I can see, this is due to line 15 in
index_analyze
(line 478 in file R/index.R), whereI(filters)
andI(char_filters)
is called. This is asI(NULL)
generates the warning (as setting any attribute, including the class attribute, on NULL is invalid)Proposed fix:
Add 2 lines between line 12 and 13:
And delete the
I
's in the next call (on line 15 but also on line 22)Environment
Using elastic version 1.0.0 under R 3.6.1 and 3.6.2 Using Rstudio under windows