|
|
@@ -99,7 +99,7 @@ public class ObjectToDocumentUtils {
|
|
|
* @return
|
|
|
*/
|
|
|
public static Document toDocument(V_Products product) {
|
|
|
- if (product == null || product.getId() == null || StringUtils.isEmpty(product.getpBrandEn())
|
|
|
+ if (product == null || product.getId() == null || null == product.getEnUU() || StringUtils.isEmpty(product.getpBrandEn())
|
|
|
|| StringUtils.isEmpty(product.getpCmpCode())) {
|
|
|
return null;
|
|
|
}
|
|
|
@@ -108,6 +108,7 @@ public class ObjectToDocumentUtils {
|
|
|
// doc)无法根据id进行更新
|
|
|
document.add(new StringField(SearchConstants.PRODUCT_PRIVATE_ID_FIELD, String.valueOf(product.getId()), Store.YES));
|
|
|
document.add(new DoubleDocValuesField(SearchConstants.PRODUCT_PRIVATE_ID_FIELD, product.getId()));
|
|
|
+ document.add(new StringField(SearchConstants.PRODUCT_PRIVATE_ENUU_FIELD, String.valueOf(product.getEnUU()), Store.YES));
|
|
|
if (!StringUtils.isEmpty(product.getTitle())) {
|
|
|
document.add(new TextField(SearchConstants.PRODUCT_PRIVATE_TITLE_FIELD, product.getTitle(), Store.YES));
|
|
|
}
|