Index: springapp/src/main/java/mk/profesori/springapp/Controller/PublicController.java
===================================================================
--- springapp/src/main/java/mk/profesori/springapp/Controller/PublicController.java	(revision a6dcc468c11364c7b67d0547aeb95b7f1fd2ad14)
+++ springapp/src/main/java/mk/profesori/springapp/Controller/PublicController.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -3,6 +3,9 @@
 import java.util.List;
 import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.jpa.domain.Specification;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -10,4 +13,5 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -17,5 +21,7 @@
 import mk.profesori.springapp.Model.StudyProgramme;
 import mk.profesori.springapp.Model.University;
+import mk.profesori.springapp.Repository.ProfessorRepository;
 import mk.profesori.springapp.Service.MainService;
+import mk.profesori.springapp.Service.Search.ProfessorSpecificationsBuilder;
 
 @RestController
@@ -27,10 +33,31 @@
     private MainService mainService;
 
+    @Autowired
+    private ProfessorRepository professorRepository;
+
+    /*
+     * @RequestMapping(value = "/professors", method = RequestMethod.GET)
+     * public List<Professor> getProfessorsByFaculty(@RequestParam Optional<Long>
+     * facultyId) {
+     * 
+     * if (!facultyId.isPresent())
+     * return mainService.getAllProfessors(); // ako nema parametar facultyId gi
+     * vrakja site profesori
+     * return mainService.getProfessorsByFacultyId(facultyId.get());
+     * }
+     */
+
     @RequestMapping(value = "/professors", method = RequestMethod.GET)
-    public List<Professor> getProfessorsByFaculty(@RequestParam Optional<Long> facultyId) {
+    @ResponseBody
+    public List<Professor> search(@RequestParam(value = "search") String search) {
+        ProfessorSpecificationsBuilder builder = new ProfessorSpecificationsBuilder();
+        Pattern pattern = Pattern.compile("(\\w+?)(:|<|>)(\\w+?),", Pattern.UNICODE_CHARACTER_CLASS);
+        Matcher matcher = pattern.matcher(search + ",");
+        while (matcher.find()) {
+            builder.with(matcher.group(1), matcher.group(2), matcher.group(3));
+        }
 
-        if (!facultyId.isPresent())
-            return mainService.getAllProfessors(); // ako nema parametar facultyId gi vrakja site profesori
-        return mainService.getProfessorsByFacultyId(facultyId.get());
+        Specification<Professor> spec = builder.build();
+        return professorRepository.findAll(spec);
     }
 
Index: springapp/src/main/java/mk/profesori/springapp/Repository/ProfessorRepository.java
===================================================================
--- springapp/src/main/java/mk/profesori/springapp/Repository/ProfessorRepository.java	(revision a6dcc468c11364c7b67d0547aeb95b7f1fd2ad14)
+++ springapp/src/main/java/mk/profesori/springapp/Repository/ProfessorRepository.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -3,4 +3,5 @@
 import java.util.List;
 
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.repository.CrudRepository;
 import org.springframework.stereotype.Repository;
@@ -10,8 +11,10 @@
 
 @Repository
-public interface ProfessorRepository extends CrudRepository<Professor, Long>{
-    
+public interface ProfessorRepository extends CrudRepository<Professor, Long>, JpaSpecificationExecutor<Professor> {
+
     public List<Professor> findAll();
+
     public Professor findByProfessorId(Long id);
+
     public List<Professor> findByFaculty(Faculty faculty);
 }
Index: springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecification.java
===================================================================
--- springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecification.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
+++ springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecification.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -0,0 +1,39 @@
+package mk.profesori.springapp.Service.Search;
+
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import org.springframework.data.jpa.domain.Specification;
+
+import mk.profesori.springapp.Model.Professor;
+
+public class ProfessorSpecification implements Specification<Professor> {
+
+    private SearchCriteria criteria;
+
+    public ProfessorSpecification(SearchCriteria criteria) {
+        this.criteria = criteria;
+    }
+
+    @Override
+    public Predicate toPredicate(Root<Professor> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+
+        if (criteria.getOperation().equalsIgnoreCase(">")) {
+            return builder.greaterThanOrEqualTo(
+                    root.<String>get(criteria.getKey()), criteria.getValue().toString());
+        } else if (criteria.getOperation().equalsIgnoreCase("<")) {
+            return builder.lessThanOrEqualTo(
+                    root.<String>get(criteria.getKey()), criteria.getValue().toString());
+        } else if (criteria.getOperation().equalsIgnoreCase(":")) {
+            if (root.get(criteria.getKey()).getJavaType() == String.class) {
+                return builder.like(
+                        root.<String>get(criteria.getKey()), "%" + criteria.getValue() + "%");
+            } else {
+                return builder.equal(root.get(criteria.getKey()), criteria.getValue());
+            }
+        }
+        return null;
+    }
+}
Index: springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecificationsBuilder.java
===================================================================
--- springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecificationsBuilder.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
+++ springapp/src/main/java/mk/profesori/springapp/Service/Search/ProfessorSpecificationsBuilder.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -0,0 +1,45 @@
+package mk.profesori.springapp.Service.Search;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.springframework.data.jpa.domain.Specification;
+
+import mk.profesori.springapp.Model.Professor;
+
+public class ProfessorSpecificationsBuilder {
+
+    private final List<SearchCriteria> params;
+
+    public ProfessorSpecificationsBuilder() {
+        params = new ArrayList<SearchCriteria>();
+    }
+
+    public ProfessorSpecificationsBuilder with(String key, String operation, Object value) {
+        params.add(new SearchCriteria(key, operation, value));
+        return this;
+    }
+
+    public Specification<Professor> build() {
+        if (params.size() == 0) {
+            return null;
+        }
+
+        List<Specification<Professor>> specs = params.stream()
+                .map(ProfessorSpecification::new)
+                .collect(Collectors.toList());
+
+        Specification<Professor> result = specs.get(0);
+
+        for (int i = 1; i < params.size(); i++) {
+            result = params.get(i)
+                    .isOrPredicate()
+                            ? Specification.where(result)
+                                    .or(specs.get(i))
+                            : Specification.where(result)
+                                    .and(specs.get(i));
+        }
+        return result;
+    }
+}
Index: springapp/src/main/java/mk/profesori/springapp/Service/Search/SearchCriteria.java
===================================================================
--- springapp/src/main/java/mk/profesori/springapp/Service/Search/SearchCriteria.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
+++ springapp/src/main/java/mk/profesori/springapp/Service/Search/SearchCriteria.java	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -0,0 +1,41 @@
+package mk.profesori.springapp.Service.Search;
+
+public class SearchCriteria {
+    private String key;
+    private String operation;
+    private Object value;
+
+    public SearchCriteria(String key, String operation, Object value) {
+        this.key = key;
+        this.operation = operation;
+        this.value = value;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    public boolean isOrPredicate() {
+        return operation.equals("|");
+    }
+}
Index: springapp/src/main/resources/application.properties
===================================================================
--- springapp/src/main/resources/application.properties	(revision a6dcc468c11364c7b67d0547aeb95b7f1fd2ad14)
+++ springapp/src/main/resources/application.properties	(revision 0ae838bae4c856b101e37355e9009e6673e5190a)
@@ -1,3 +1,4 @@
 spring.datasource.url=jdbc:postgresql://localhost:5432/profesori.mk
+spring.datasource.connectionProperties=useUnicode=true;characterEncoding=utf-8;
 spring.datasource.username=postgres
 spring.datasource.password=1win7337
